Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fixed problem with NURL-generation upon first startup (a new kelondroFlexTable was generated, which should not)

orbitercd5f7e137c5d
diff --git a/source/de/anomic/index/indexURL.java b/source/de/anomic/index/indexURL.java
index 4030aa5c1..7aab13f9e 100644
--- a/source/de/anomic/index/indexURL.java
+++ b/source/de/anomic/index/indexURL.java
@@ -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() {
diff --git a/source/de/anomic/plasma/plasmaCrawlNURL.java b/source/de/anomic/plasma/plasmaCrawlNURL.java
index 87ef8e982..06c48707d 100644
--- a/source/de/anomic/plasma/plasmaCrawlNURL.java
+++ b/source/de/anomic/plasma/plasmaCrawlNURL.java
@@ -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);
}
}