diff --git a/source/de/anomic/crawler/CrawlProfile.java b/source/de/anomic/crawler/CrawlProfile.java index 3d2491cd5..8dab24559 100644 --- a/source/de/anomic/crawler/CrawlProfile.java +++ b/source/de/anomic/crawler/CrawlProfile.java @@ -41,6 +41,7 @@ import de.anomic.kelondro.util.FileUtils; import de.anomic.kelondro.util.kelondroException; import de.anomic.yacy.yacySeedDB; import de.anomic.yacy.yacyURL; +import de.anomic.yacy.logging.Log; public class CrawlProfile { @@ -57,6 +58,12 @@ public class CrawlProfile { profileTableFile.getParentFile().mkdirs(); final Heap dyn = new Heap(profileTableFile, yacySeedDB.commonHashLength, NaturalOrder.naturalOrder, 1024 * 64); profileTable = new MapView(dyn, 500, '_'); + profileIterator pi = new profileIterator(true); + entry e; + while (pi.hasNext()) { + e = pi.next(); + Log.logInfo("CrawlProfiles", "loaded Profile " + e.handle() + ": " + e.name()); + } } public void clear() { diff --git a/source/de/anomic/crawler/CrawlSwitchboard.java b/source/de/anomic/crawler/CrawlSwitchboard.java index b2807ac9f..6ac52521f 100644 --- a/source/de/anomic/crawler/CrawlSwitchboard.java +++ b/source/de/anomic/crawler/CrawlSwitchboard.java @@ -103,14 +103,7 @@ public final class CrawlSwitchboard { } } initActiveCrawlProfiles(); - log.logInfo("Loaded active crawl profiles from file " + profilesActiveFile.getName() + - ", " + this.profilesActiveCrawls.size() + " entries"); - Iterator i = this.profilesActiveCrawls.profiles(true); - entry c; - while (i.hasNext()) { - c = i.next(); - log.logInfo("active crawl: " + c.handle() + " - " + c.name()); - } + log.logInfo("Loaded active crawl profiles from file " + profilesActiveFile.getName() + ", " + this.profilesActiveCrawls.size() + " entries"); final File profilesPassiveFile = new File(queuesRoot, DBFILE_PASSIVE_CRAWL_PROFILES); if (!profilesPassiveFile.exists()) { // migrate old file diff --git a/source/de/anomic/kelondro/blob/MapView.java b/source/de/anomic/kelondro/blob/MapView.java index 3e286508f..ab247ac29 100644 --- a/source/de/anomic/kelondro/blob/MapView.java +++ b/source/de/anomic/kelondro/blob/MapView.java @@ -279,12 +279,12 @@ public class MapView { } - public synchronized objectIterator entries(final boolean up, final boolean rotating) throws IOException { - return new objectIterator(keys(up, rotating)); + public synchronized MapIterator entries(final boolean up, final boolean rotating) throws IOException { + return new MapIterator(keys(up, rotating)); } - public synchronized objectIterator entries(final boolean up, final boolean rotating, final byte[] firstKey, final byte[] secondKey) throws IOException { - return new objectIterator(keys(up, rotating, firstKey, secondKey)); + public synchronized MapIterator entries(final boolean up, final boolean rotating, final byte[] firstKey, final byte[] secondKey) throws IOException { + return new MapIterator(keys(up, rotating, firstKey, secondKey)); } /** @@ -311,14 +311,14 @@ public class MapView { close(); } - public class objectIterator implements Iterator> { + public class MapIterator implements Iterator> { // enumerates Map-Type elements // the key is also included in every map that is returned; it's key is 'key' Iterator keyIterator; boolean finish; - public objectIterator(final Iterator keyIterator) { + public MapIterator(final Iterator keyIterator) { this.keyIterator = keyIterator; this.finish = false; } diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index f071423b1..dde46dbf5 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -626,10 +626,6 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi new String[]{"condenseDocument", "CrawlStacker"}, this, "parseDocument", 2 * serverProcessor.useCPU + 1, indexingCondensementProcessor, 2 * serverProcessor.useCPU + 1); - // clean up profiles - this.log.logConfig("Cleaning Profiles"); - try { cleanProfiles(); } catch (final InterruptedException e) { /* Ignore this here */ } - // deploy busy threads log.logConfig("Starting Threads"); MemoryControl.gc(10000, "plasmaSwitchboard, help for profiler"); // help for profiler - thq