Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- better control of chunk size in dht selection - more restrict values in selection - step to 4 vertical partitions
orbiter40d9849aa417
diff --git a/defaults/yacy.network.freeworld.unit b/defaults/yacy.network.freeworld.unitindex c866febc4..d8e23e571 100644--- a/defaults/yacy.network.freeworld.unit+++ b/defaults/yacy.network.freeworld.unit@@ -14,7 +14,7 @@ network.unit.search.time = 4network.unit.dht = truenetwork.unit.dhtredundancy.junior = 1network.unit.dhtredundancy.senior = 3-network.unit.dht.partitionExponent = 1+network.unit.dht.partitionExponent = 2network.unit.remotecrawl.speed = 6network.unit.bootstrap.seedlist0 = http://www.yacy.net/seed.txtnetwork.unit.bootstrap.seedlist1 = http://home.arcor.de/hermens/yacy/seed.txtdiff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex 69854effd..c56b7983a 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -179,9 +179,10 @@ import de.anomic.yacy.dht.PeerSelection;public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.QueueEntry> implements serverSwitch<IndexingStack.QueueEntry> {// load slots- public static int xstackCrawlSlots = 2000;- private int dhtTransferIndexCount = 100;- public static long lastPPMUpdate = System.currentTimeMillis()- 30000;+ public static int xstackCrawlSlots = 2000;+ private int dhtMaxContainerCount = 100;+ private int dhtMaxReferenceCount = 1000;+ public static long lastPPMUpdate = System.currentTimeMillis()- 30000;// colored list managementpublic static TreeSet<String> badwords = null;@@ -567,7 +568,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack."global.any".indexOf(getConfig("network.unit.domain", "global")) >= 0);// initializing dht chunk generation- this.dhtTransferIndexCount = (int) getConfigLong(plasmaSwitchboardConstants.INDEX_DIST_CHUNK_SIZE_START, 50);+ this.dhtMaxReferenceCount = (int) getConfigLong(plasmaSwitchboardConstants.INDEX_DIST_CHUNK_SIZE_START, 50);// init robinson cluster// before we do that, we wait some time until the seed list is loaded.@@ -1920,7 +1921,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.int c = this.dhtDispatcher.selectContainersToCache(startHash,limitHash,- dhtTransferIndexCount,+ dhtMaxContainerCount,+ dhtMaxReferenceCount,2000);log.logInfo("dhtTransferJob: Dispatcher selected " + c + " containers");} catch (IOException e) {diff --git a/source/de/anomic/yacy/dht/Dispatcher.java b/source/de/anomic/yacy/dht/Dispatcher.javaindex adae0e6ed..5ccbd0448 100755--- a/source/de/anomic/yacy/dht/Dispatcher.java+++ b/source/de/anomic/yacy/dht/Dispatcher.java@@ -142,10 +142,11 @@ public class Dispatcher {final String hash,final String limitHash,final int maxContainerCount,+ final int maxReferenceCount,final int maxtime) throws IOException {// prefer file- ArrayList<indexContainer> containers = selectContainers(hash, limitHash, maxContainerCount, maxtime, false);+ ArrayList<indexContainer> containers = selectContainers(hash, limitHash, maxContainerCount, maxReferenceCount, maxtime, false);// if ram does not provide any result, take from file//if (containers.size() == 0) containers = selectContainers(hash, limitHash, maxContainerCount, maxtime, false);@@ -156,6 +157,7 @@ public class Dispatcher {final String hash,final String limitHash,final int maxContainerCount,+ final int maxReferenceCount,final int maxtime,final boolean ram) throws IOException {@@ -168,14 +170,17 @@ public class Dispatcher {// first select the containerfinal long timeout = (maxtime < 0) ? Long.MAX_VALUE : System.currentTimeMillis() + maxtime;while (- (maxContainerCount > refcount) &&+ (containers.size() < maxContainerCount) &&+ (refcount < maxReferenceCount) &&(indexContainerIterator.hasNext()) &&+ (System.currentTimeMillis() < timeout) &&((container = indexContainerIterator.next()) != null) &&- (container.size() > 0) &&((containers.size() == 0) ||- (Base64Order.enhancedComparator.compare(container.getWordHash(), limitHash) < 0)) &&- (System.currentTimeMillis() < timeout)+ (Base64Order.enhancedComparator.compare(container.getWordHash(), limitHash) < 0))+) {+ if (container.size() == 0) continue;+ refcount += container.size();containers.add(container);}// then remove the container from the backend@@ -198,12 +203,13 @@ public class Dispatcher {final String hash,final String limitHash,final int maxContainerCount,+ final int maxReferenceCount,final int maxtime) throws IOException {if (this.selectedContainerCache != null && this.selectedContainerCache.size() > 0) {this.log.logInfo("selectContainersToCache: selectedContainerCache is already filled, no selection done.");return 0;}- this.selectedContainerCache = selectContainers(hash, limitHash, maxContainerCount, maxtime);+ this.selectedContainerCache = selectContainers(hash, limitHash, maxContainerCount, maxReferenceCount, maxtime);this.log.logInfo("selectContainersToCache: selectedContainerCache was filled with " + this.selectedContainerCache.size() + " entries");return this.selectedContainerCache.size();}