@@ -0,0 +1,1826 @@
+import java.util.Iterator;%0Aimport java.util.Date;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport dk.netarkivet.common.utils.FilterIterator;%0Aimport dk.netarkivet.harvester.datamodel.Domain;%0Aimport dk.netarkivet.harvester.datamodel.DomainConfiguration;%0Aimport dk.netarkivet.harvester.datamodel.DomainDAO;%0A%0A%0Apublic class TestSnapShotHarvestDomainConfigRetrieval %7B%0A%0A    /**%0A     * @param args%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(%22Testing first step snapshot harvest%22 +  new Date());%0A        DomainDAO dao = DomainDAO.getInstance();%0A%0A        Iterator%3CDomainConfiguration%3E i = new FilterIterator%3CDomain, DomainConfiguration%3E(%0A                dao.getAllDomainsInSnapshotHarvestOrder()) %7B %0A            public DomainConfiguration filter(Domain domain) %7B%0A                if (domain.getAliasInfo() == null%0A                        %7C%7C domain.getAliasInfo().isExpired()) %7B%0A                    return domain.getDefaultConfiguration();%0A                %7D else %7B%0A                    return null;%0A                %7D%0A            %7D%0A        %7D;%0A        System.out.println(%22Iterator initialized %22 + new Date());%0A        long count = 0;%0A        List%3CDomainConfiguration%3E subset = new ArrayList%3CDomainConfiguration%3E();%0A        while (i.hasNext()) %7B%0A            count++;%0A            if (subset.size() %3E= 10000) %7B%0A                subset = new ArrayList%3CDomainConfiguration%3E();%0A                System.out.println(%22collected %22 + subset.size() + %22  configs at %22 + new Date());%0A            %7D%0A            DomainConfiguration dc = i.next();%0A            subset.add(dc);%0A            if (count %25 100 == 0) %7B%0A                System.out.println(%22#%22 + count + %22: (conf-name, domain)= (%22 + dc.getName() %0A                        + %22, %22 + dc.getDomainName() + %22) at %22 + new Date());%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Test program for testing speed on retrieving DomainConfigs for snapshot harvests