fixed problem with NURL-generation upon first startup

(a new kelondroFlexTable was generated, which should not)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2402 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 248627ab92
commit cd5f7e137c

@ -421,6 +421,7 @@ public class indexURL {
}
public boolean remove(String hash) {
if (hash == null) return false;
try {
urlHashCache.remove(hash.getBytes());
return true;
@ -440,7 +441,7 @@ public class indexURL {
public int[] cacheNodeStatus() {
if (urlHashCache instanceof kelondroTree) return ((kelondroTree) urlHashCache).cacheNodeStatus();
return null;
return new int[]{0,0,0,0,0,0,0,0,0,0};
}
public String[] cacheObjectStatus() {

@ -55,7 +55,6 @@ import java.util.Iterator;
import de.anomic.index.indexURL;
import de.anomic.kelondro.kelondroBase64Order;
import de.anomic.kelondro.kelondroException;
import de.anomic.kelondro.kelondroFlexTable;
import de.anomic.kelondro.kelondroRecords;
import de.anomic.kelondro.kelondroStack;
import de.anomic.kelondro.kelondroTree;
@ -185,12 +184,8 @@ public class plasmaCrawlNURL extends indexURL {
} else {
// create new cache
oldCacheFile.getParentFile().mkdirs();
try {
urlHashCache = new kelondroFlexTable(cacheStacksPath, "urlNotice2.table", kelondroBase64Order.enhancedCoder, bufferkb * 0x400, preloadTime, rowdef, true);
} catch (IOException e) {
e.printStackTrace();
urlHashCache = new kelondroTree(oldCacheFile, bufferkb * 0x400, preloadTime, kelondroTree.defaultObjectCachePercent, rowdef, true);
}
//urlHashCache = new kelondroFlexTable(cacheStacksPath, "urlNotice2.table", kelondroBase64Order.enhancedCoder, bufferkb * 0x400, preloadTime, rowdef, true);
urlHashCache = new kelondroTree(oldCacheFile, bufferkb * 0x400, preloadTime, kelondroTree.defaultObjectCachePercent, rowdef, true);
}
}

Loading…
Cancel
Save