*) Consistent use of minCount for index transfer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1645 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
hermens 19 years ago
parent 0017812b2e
commit 3b6328ad02

@ -202,8 +202,8 @@ public final class plasmaWordIndexDistribution {
try {
String startPointHash = selectTransferStart();
this.log.logFine("Selected hash " + startPointHash + " as start point for index distribution, distance = " + yacyDHTAction.dhtDistance(yacyCore.seedDB.mySeed.hash, startPointHash));
Object[] selectResult = selectTransferContainers(startPointHash, indexCount/3, indexCount);
final int minCount = indexCount/3;
Object[] selectResult = selectTransferContainers(startPointHash, minCount, indexCount);
indexContainers = (plasmaWordIndexEntryContainer[]) selectResult[0];
HashMap urlCache = (HashMap) selectResult[1]; // String (url-hash) / plasmaCrawlLURL.Entry
//int refcount = ((Integer) selectResult[2]).intValue();
@ -217,7 +217,7 @@ public final class plasmaWordIndexDistribution {
for (int i = 0; i < indexContainers.length; i++) {
indexCount += indexContainers[i].size();
}
if (indexCount < 50) {
if (indexCount < minCount) {
this.log.logFine("Too few (" + indexCount + ") indexes selected for transfer.");
return -1; // failed
}

Loading…
Cancel
Save