Skip to content

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

fix for bug that caused the peer-counter problem. See http://www.yacy-forum.de/viewtopic.php?p=16016#16016 The kelondroDyn now uses a generic fill character. kelondroDyn-Tables containing peer/word/url-hashes must not use '_' as fill character.

orbiter3419b3bcddb3
diff --git a/source/de/anomic/data/bookmarksDB.java b/source/de/anomic/data/bookmarksDB.java
index d6527a839..063fed229 100644
--- a/source/de/anomic/data/bookmarksDB.java
+++ b/source/de/anomic/data/bookmarksDB.java
@@ -71,37 +71,37 @@ public class bookmarksDB {
if(bookmarksFile.exists()){
try {
//open it
- this.bookmarksTable=new kelondroMap(new kelondroDyn(bookmarksFile, 1024*bufferkb));
+ this.bookmarksTable=new kelondroMap(new kelondroDyn(bookmarksFile, 1024*bufferkb, '_'));
} catch (IOException e) {
//database reset :-((
bookmarksFile.delete();
bookmarksFile.getParentFile().mkdirs();
//urlHash is 12 bytes long
- this.bookmarksTable = new kelondroMap(new kelondroDyn(bookmarksFile, bufferkb * 1024, 12, 256, true));
+ this.bookmarksTable = new kelondroMap(new kelondroDyn(bookmarksFile, bufferkb * 1024, 12, 256, '_', true));
}
}else{
//new database
bookmarksFile.getParentFile().mkdirs();
- this.bookmarksTable = new kelondroMap(new kelondroDyn(bookmarksFile, bufferkb * 1024, 12, 256, true));
+ this.bookmarksTable = new kelondroMap(new kelondroDyn(bookmarksFile, bufferkb * 1024, 12, 256, '_', true));
}
//tags
//check if database exists
if(tagsFile.exists()){
try {
//open it
- this.tagsTable=new kelondroMap(new kelondroDyn(tagsFile, 1024*bufferkb));
+ this.tagsTable=new kelondroMap(new kelondroDyn(tagsFile, 1024*bufferkb, '_'));
} catch (IOException e) {
//reset database
tagsFile.delete();
tagsFile.getParentFile().mkdirs();
// max. 128 byte long tags
- this.tagsTable = new kelondroMap(new kelondroDyn(tagsFile, bufferkb * 1024, 128, 256, true));
+ this.tagsTable = new kelondroMap(new kelondroDyn(tagsFile, bufferkb * 1024, 128, 256, '_', true));
rebuildTags();
}
}else{
//new database
tagsFile.getParentFile().mkdirs();
- this.tagsTable = new kelondroMap(new kelondroDyn(tagsFile, bufferkb * 1024, 128, 256, true));
+ this.tagsTable = new kelondroMap(new kelondroDyn(tagsFile, bufferkb * 1024, 128, 256, '_', true));
rebuildTags();
}
// dates
@@ -109,19 +109,19 @@ public class bookmarksDB {
if(datesFile.exists()){
try {
//open it
- this.datesTable=new kelondroMap(new kelondroDyn(datesFile, 1024*bufferkb));
+ this.datesTable=new kelondroMap(new kelondroDyn(datesFile, 1024*bufferkb, '_'));
} catch (IOException e) {
//reset database
datesFile.delete();
datesFile.getParentFile().mkdirs();
//YYYY-MM-DDTHH:mm:ssZ = 20 byte. currently used: YYYY-MM-DD = 10 bytes
- this.datesTable = new kelondroMap(new kelondroDyn(datesFile, bufferkb * 1024, 20, 256, true));
+ this.datesTable = new kelondroMap(new kelondroDyn(datesFile, bufferkb * 1024, 20, 256, '_', true));
rebuildDates();
}
}else{
//new database
datesFile.getParentFile().mkdirs();
- this.datesTable = new kelondroMap(new kelondroDyn(datesFile, bufferkb * 1024, 20, 256, true));
+ this.datesTable = new kelondroMap(new kelondroDyn(datesFile, bufferkb * 1024, 20, 256, '_', true));
rebuildDates();
}
}
diff --git a/source/de/anomic/data/messageBoard.java b/source/de/anomic/data/messageBoard.java
index ccefa8e15..e50893892 100644
--- a/source/de/anomic/data/messageBoard.java
+++ b/source/de/anomic/data/messageBoard.java
@@ -71,12 +71,12 @@ public class messageBoard {
new File(path.getParent()).mkdir();
if (database == null) {
if (path.exists()) try {
- database = new kelondroMap(new kelondroDyn(path, bufferkb * 0x400));
+ database = new kelondroMap(new kelondroDyn(path, bufferkb * 0x400, '_'));
} catch (IOException e) {
path.delete();
- database = new kelondroMap(new kelondroDyn(path, bufferkb * 0x400, categoryLength + dateFormat.length() + 2, recordSize, true));
+ database = new kelondroMap(new kelondroDyn(path, bufferkb * 0x400, categoryLength + dateFormat.length() + 2, recordSize, '_', true));
} else {
- database = new kelondroMap(new kelondroDyn(path, bufferkb * 0x400, categoryLength + dateFormat.length() + 2, recordSize, true));
+ database = new kelondroMap(new kelondroDyn(path, bufferkb * 0x400, categoryLength + dateFormat.length() + 2, recordSize, '_', true));
}
}
sn = 0;
diff --git a/source/de/anomic/data/userDB.java b/source/de/anomic/data/userDB.java
index c2f77f6a9..eb3207744 100644
--- a/source/de/anomic/data/userDB.java
+++ b/source/de/anomic/data/userDB.java
@@ -76,19 +76,19 @@ public final class userDB {
this.bufferkb = bufferkb;
if (userTableFile.exists()) {
try {
- this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024));
+ this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024, '_'));
} catch (kelondroException e) {
userTableFile.delete();
userTableFile.getParentFile().mkdirs();
- this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024, 128, 256, true));
+ this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024, 128, 256, '_', true));
} catch (IOException e) {
userTableFile.delete();
userTableFile.getParentFile().mkdirs();
- this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024, 128, 256, true));
+ this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024, 128, 256, '_', true));
}
} else {
userTableFile.getParentFile().mkdirs();
- this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024, 128, 256, true));
+ this.userTable = new kelondroMap(new kelondroDyn(userTableFile, bufferkb * 1024, 128, 256, '_', true));
}
}
@@ -107,7 +107,7 @@ public final class userDB {
} catch (IOException e) {}
if (!(userTableFile.delete())) throw new RuntimeException("cannot delete user database");
userTableFile.getParentFile().mkdirs();
- userTable = new kelondroMap(new kelondroDyn(userTableFile, this.bufferkb, 256, 512, true));
+ userTable = new kelondroMap(new kelondroDyn(userTableFile, this.bufferkb, 256, 512, '_', true));
}
public void close() {
diff --git a/source/de/anomic/data/wikiBoard.java b/source/de/anomic/data/wikiBoard.java
index 29ce2aacc..188b63b8b 100644
--- a/source/de/anomic/data/wikiBoard.java
+++ b/source/de/anomic/data/wikiBoard.java
@@ -73,21 +73,21 @@ public class wikiBoard {
new File(actpath.getParent()).mkdir();
if (datbase == null) {
if (actpath.exists()) try {
- datbase = new kelondroMap(new kelondroDyn(actpath, bufferkb / 2 * 0x40));
+ datbase = new kelondroMap(new kelondroDyn(actpath, bufferkb / 2 * 0x40, '_'));
} catch (IOException e) {
- datbase = new kelondroMap(new kelondroDyn(actpath, bufferkb / 2 * 0x400, keyLength, recordSize, true));
+ datbase = new kelondroMap(new kelondroDyn(actpath, bufferkb / 2 * 0x400, keyLength, recordSize, '_', true));
} else {
- datbase = new kelondroMap(new kelondroDyn(actpath, bufferkb / 2 * 0x400, keyLength, recordSize, true));
+ datbase = new kelondroMap(new kelondroDyn(actpath, bufferkb / 2 * 0x400, keyLength, recordSize, '_', true));
}
}
new File(bkppath.getParent()).mkdir();
if (bkpbase == null) {
if (bkppath.exists()) try {
- bkpbase = new kelondroMap(new kelondroDyn(bkppath, bufferkb / 2 * 0x400));
+ bkpbase = new kelondroMap(new kelondroDyn(bkppath, bufferkb / 2 * 0x400, '_'));
} catch (IOException e) {
- bkpbase = new kelondroMap(new kelondroDyn(bkppath, bufferkb / 2 * 0x400, keyLength + dateFormat.length(), recordSize, true));
+ bkpbase = new kelondroMap(new kelondroDyn(bkppath, bufferkb / 2 * 0x400, keyLength + dateFormat.length(), recordSize, '_', true));
} else {
- bkpbase = new kelondroMap(new kelondroDyn(bkppath, bufferkb / 2 * 0x400, keyLength + dateFormat.length(), recordSize, true));
+ bkpbase = new kelondroMap(new kelondroDyn(bkppath, bufferkb / 2 * 0x400, keyLength + dateFormat.length(), recordSize, '_', true));
}
}
}
diff --git a/source/de/anomic/kelondro/kelondroDyn.java b/source/de/anomic/kelondro/kelondroDyn.java
index 7d08a56ef..a2e0740b6 100644
--- a/source/de/anomic/kelondro/kelondroDyn.java
+++ b/source/de/anomic/kelondro/kelondroDyn.java
@@ -68,16 +68,18 @@ public class kelondroDyn extends kelondroTree {
private int keylen;
private int reclen;
private int segmentCount;
+ private char fillChar;
- public kelondroDyn(File file, long buffersize /*bytes*/, int key, int nodesize, boolean exitOnFail) {
- this(file, buffersize, key, nodesize, new kelondroNaturalOrder(true), exitOnFail);
+ public kelondroDyn(File file, long buffersize /*bytes*/, int key, int nodesize, char fillChar, boolean exitOnFail) {
+ this(file, buffersize, key, nodesize, fillChar, new kelondroNaturalOrder(true), exitOnFail);
}
- public kelondroDyn(File file, long buffersize /*bytes*/, int key, int nodesize, kelondroOrder objectOrder, boolean exitOnFail) {
+ public kelondroDyn(File file, long buffersize /*bytes*/, int key, int nodesize, char fillChar, kelondroOrder objectOrder, boolean exitOnFail) {
// creates a new dynamic tree
super(file, buffersize, new int[] {key + counterlen, nodesize}, objectOrder, 1, 8, exitOnFail);
this.keylen = columnSize(0) - counterlen;
this.reclen = columnSize(1);
+ this.fillChar = fillChar;
this.segmentCacheKey = null;
this.segmentCacheContent = null;
// init counter: write into text field
@@ -85,11 +87,12 @@ public class kelondroDyn extends kelondroTree {
writeSegmentCount();
}
- public kelondroDyn(File file, long buffersize) throws IOException {
+ public kelondroDyn(File file, long buffersize, char fillChar) throws IOException {
// this opens a file with an existing dynamic tree
super(file, buffersize);
this.keylen = columnSize(0) - counterlen;
this.reclen = columnSize(1);
+ this.fillChar = fillChar;
this.segmentCacheKey = null;
this.segmentCacheContent = null;
this.segmentCount = 0;
@@ -132,7 +135,7 @@ public class kelondroDyn extends kelondroTree {
private byte[] dynKey(String key, int record) {
if (key.length() > keylen) throw new RuntimeException("key len (" + key.length() + ") out of limit (" + keylen + "): '" + key + "'");
- while (key.length() < keylen) key = key + "_";
+ while (key.length() < keylen) key = key + fillChar;
key = key + counter(record);
return key.getBytes();
}
@@ -140,7 +143,7 @@ public class kelondroDyn extends kelondroTree {
private String origKey(byte[] rawKey) {
int n = keylen - 1;
if (n >= rawKey.length) n = rawKey.length - 1;
- while ((n > 0) && (rawKey[n] == (byte) '_')) n--;
+ while ((n > 0) && (rawKey[n] == (byte) fillChar)) n--;
return new String(rawKey, 0, n + 1);
}
@@ -429,7 +432,7 @@ public class kelondroDyn extends kelondroTree {
} else if (args.length == 1) {
// open a db and list keys
try {
- kelondroDyn kd = new kelondroDyn(new File(args[0]), 0x100000);
+ kelondroDyn kd = new kelondroDyn(new File(args[0]), 0x100000, '_');
System.out.println(kd.size() + " elements in DB");
Iterator i = kd.dynKeys(true, false);
while (i.hasNext()) System.out.println((String) i.next());
@@ -445,7 +448,7 @@ public class kelondroDyn extends kelondroTree {
File f = new File(args[3]);
kelondroDyn kd;
try {
- if (db.exists()) kd = new kelondroDyn(db, 0x100000); else kd = new kelondroDyn(db, 0x100000, 80, 200, true);
+ if (db.exists()) kd = new kelondroDyn(db, 0x100000, '_'); else kd = new kelondroDyn(db, 0x100000, 80, 200, '_', true);
if (writeFile) kd.readFile(key, f); else kd.writeFile(key, f);
} catch (IOException e) {
System.out.println("ERROR: " + e.toString());
@@ -466,7 +469,7 @@ public class kelondroDyn extends kelondroTree {
int steps = 0;
while (true) {
if (testFile.exists()) testFile.delete();
- tt = new kelondroDyn(testFile, 0, 4 ,100, true);
+ tt = new kelondroDyn(testFile, 0, 4 ,100, '_', true);
steps = ((int) System.currentTimeMillis() % 7) * (((int) System.currentTimeMillis() + 17) % 11);
t = s;
d = "";
diff --git a/source/de/anomic/kelondro/kelondroDynTree.java b/source/de/anomic/kelondro/kelondroDynTree.java
index 8e4d6af61..6c9628792 100644
--- a/source/de/anomic/kelondro/kelondroDynTree.java
+++ b/source/de/anomic/kelondro/kelondroDynTree.java
@@ -69,7 +69,7 @@ public class kelondroDynTree {
private Hashtable buffer, cache;
private long cycleBuffer;
- public kelondroDynTree(File file, long buffersize, int keylength, int nodesize, int[] columns, boolean exitOnFail) {
+ public kelondroDynTree(File file, long buffersize, int keylength, int nodesize, int[] columns, char fillChar, boolean exitOnFail) {
// creates a new DynTree
this.file = file;
this.columns = columns;
@@ -78,11 +78,11 @@ public class kelondroDynTree {
//this.cycleCache = Long.MIN_VALUE;
this.cycleBuffer = Long.MIN_VALUE;
if (file.exists()) file.delete();
- this.table = new kelondroDyn(file, buffersize, keylength, nodesize, exitOnFail);
+ this.table = new kelondroDyn(file, buffersize, keylength, nodesize, fillChar, exitOnFail);
this.treeRAHandles = new Hashtable();
}
- public kelondroDynTree(File file, long buffersize) throws IOException {
+ public kelondroDynTree(File file, long buffersize, char fillChar) throws IOException {
// opens an existing DynTree
this.file = file;
this.buffer = new Hashtable();
@@ -90,7 +90,7 @@ public class kelondroDynTree {
//this.cycleCache = Long.MIN_VALUE;
this.cycleBuffer = Long.MIN_VALUE;
if (!(file.exists())) throw new IOException("DynTree " + file.toString() + " does not exist");
- this.table = new kelondroDyn(file, buffersize);
+ this.table = new kelondroDyn(file, buffersize, fillChar);
// read one element to measure the size of columns
if (table.size() == 0) throw new IOException("DynTree " + file.toString() + " is empty. Should not.");
this.treeRAHandles = new Hashtable();
@@ -349,10 +349,10 @@ public class kelondroDynTree {
System.out.println("start");
File file = new File("D:\\bin\\testDyn.db");
if (file.exists()) {
- kelondroDynTree dt = new kelondroDynTree(file, 0x100000L);
+ kelondroDynTree dt = new kelondroDynTree(file, 0x100000L, '_');
System.out.println("opened: table keylength=" + dt.table.columnSize(0) + ", sectorsize=" + dt.table.columnSize(1) + ", " + dt.table.size() + " entries.");
} else {
- kelondroDynTree dt = new kelondroDynTree(file, 0x100000L, 16, 512, new int[] {10,20,30}, true);
+ kelondroDynTree dt = new kelondroDynTree(file, 0x100000L, 16, 512, new int[] {10,20,30}, '_', true);
String name;
kelondroTree t;
byte[][] line = new byte[][] {"".getBytes(), "abc".getBytes(), "def".getBytes()};
diff --git a/source/de/anomic/kelondro/kelondroTables.java b/source/de/anomic/kelondro/kelondroTables.java
index f8d3ce836..8424eef2d 100644
--- a/source/de/anomic/kelondro/kelondroTables.java
+++ b/source/de/anomic/kelondro/kelondroTables.java
@@ -61,27 +61,27 @@ public class kelondroTables {
if (!(tablesPath.exists())) tablesPath.mkdirs();
}
- public void declareMaps(String tablename, int keysize, int nodesize, boolean exitOnFail) {
- declareMaps(tablename, keysize, nodesize, null, null, exitOnFail);
+ public void declareMaps(String tablename, int keysize, int nodesize, char fillChar, boolean exitOnFail) {
+ declareMaps(tablename, keysize, nodesize, null, null, fillChar, exitOnFail);
}
- public void declareMaps(String tablename, int keysize, int nodesize, String[] sortfields, String[] accfields, boolean exitOnFail) {
- declareMaps(tablename, keysize, nodesize, sortfields, accfields, 0x800, exitOnFail);
+ public void declareMaps(String tablename, int keysize, int nodesize, String[] sortfields, String[] accfields, char fillChar, boolean exitOnFail) {
+ declareMaps(tablename, keysize, nodesize, sortfields, accfields, fillChar, 0x800, exitOnFail);
}
- public void declareMaps(String tablename, int keysize, int nodesize, String[] sortfields, String[] accfields, long buffersize /*bytes*/, boolean exitOnFail) {
+ public void declareMaps(String tablename, int keysize, int nodesize, String[] sortfields, String[] accfields, char fillChar, long buffersize /*bytes*/, boolean exitOnFail) {
if (mTables.containsKey(tablename)) throw new RuntimeException("kelondroTables.declareMap: table '" + tablename + "' declared twice.");
if (tTables.containsKey(tablename)) throw new RuntimeException("kelondroTables.declareMap: table '" + tablename + "' declared already in other context.");
File tablefile = new File(tablesPath, "table." + tablename + ".mdb");
kelondroDyn dyn;
if (tablefile.exists()) try {
- dyn = new kelondroDyn(tablefile, buffersize);
+ dyn = new kelondroDyn(tablefile, buffersize, fillChar);
} catch (IOException e) {
tablefile.getParentFile().mkdirs();
- dyn = new kelondroDyn(tablefile, buffersize, keysize, nodesize, exitOnFail);
+ dyn = new kelondroDyn(tablefile, buffersize, keysize, nodesize, fillChar, exitOnFail);
} else {
tablefile.getParentFile().mkdirs();
- dyn = new kelondroDyn(tablefile, buffersize, keysize, nodesize, exitOnFail);
+ dyn = new kelondroDyn(tablefile, buffersize, keysize, nodesize, fillChar, exitOnFail);
}
kelondroMap map = new kelondroMap(dyn, sortfields, accfields);
mTables.put(tablename, map);
diff --git a/source/de/anomic/plasma/plasmaCrawlProfile.java b/source/de/anomic/plasma/plasmaCrawlProfile.java
index f81592122..249132fc9 100644
--- a/source/de/anomic/plasma/plasmaCrawlProfile.java
+++ b/source/de/anomic/plasma/plasmaCrawlProfile.java
@@ -64,13 +64,13 @@ public class plasmaCrawlProfile {
this.profileTableFile = file;
kelondroDyn dyn = null;
if (profileTableFile.exists()) try {
- dyn = new kelondroDyn(file, bufferkb * 1024);
+ dyn = new kelondroDyn(file, bufferkb * 1024, '#');
} catch (IOException e) {
profileTableFile.delete();
- dyn = new kelondroDyn(file, bufferkb * 1024, plasmaURL.urlCrawlProfileHandleLength, 2000, true);
+ dyn = new kelondroDyn(file, bufferkb * 1024, plasmaURL.urlCrawlProfileHandleLength, 2000, '#', true);
} else {
profileTableFile.getParentFile().mkdirs();
- dyn = new kelondroDyn(file, bufferkb * 1024, plasmaURL.urlCrawlProfileHandleLength, 2000, true);
+ dyn = new kelondroDyn(file, bufferkb * 1024, plasmaURL.urlCrawlProfileHandleLength, 2000, '#', true);
}
profileTable = new kelondroMap(dyn);
}
@@ -88,7 +88,7 @@ public class plasmaCrawlProfile {
if (profileTable != null) try { profileTable.close(); } catch (IOException e) {}
if (!(profileTableFile.delete())) throw new RuntimeException("cannot delete crawl profile database");
profileTableFile.getParentFile().mkdirs();
- profileTable = new kelondroMap(new kelondroDyn(profileTableFile, bufferkb * 1024, plasmaURL.urlCrawlProfileHandleLength, 2000, true));
+ profileTable = new kelondroMap(new kelondroDyn(profileTableFile, bufferkb * 1024, plasmaURL.urlCrawlProfileHandleLength, 2000, '#', true));
}
public void close() {
diff --git a/source/de/anomic/plasma/plasmaCrawlRobotsTxt.java b/source/de/anomic/plasma/plasmaCrawlRobotsTxt.java
index 233ef1fd4..6d1043095 100644
--- a/source/de/anomic/plasma/plasmaCrawlRobotsTxt.java
+++ b/source/de/anomic/plasma/plasmaCrawlRobotsTxt.java
@@ -68,17 +68,17 @@ public class plasmaCrawlRobotsTxt {
this.bufferkb = bufferkb;
if (robotsTableFile.exists()) {
try {
- robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024));
+ robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024, '_'));
} catch (kelondroException e) {
robotsTableFile.delete();
- robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024, 256, 512, true));
+ robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024, 256, 512, '_', true));
} catch (IOException e) {
robotsTableFile.delete();
- robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024, 256, 512, true));
+ robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024, 256, 512, '_', true));
}
} else {
robotsTableFile.getParentFile().mkdirs();
- robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024, 256, 512, true));
+ robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, bufferkb * 1024, 256, 512, '_', true));
}
}
@@ -97,7 +97,7 @@ public class plasmaCrawlRobotsTxt {
} catch (IOException e) {}
if (!(robotsTableFile.delete())) throw new RuntimeException("cannot delete robots.txt database");
robotsTableFile.getParentFile().mkdirs();
- robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, this.bufferkb, 256, 512, true));
+ robotsTable = new kelondroMap(new kelondroDyn(robotsTableFile, this.bufferkb, 256, 512, '_', true));
}
public void close() {
diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.java
index a0162b9e8..14d8e1117 100644
--- a/source/de/anomic/plasma/plasmaHTCache.java
+++ b/source/de/anomic/plasma/plasmaHTCache.java
@@ -134,9 +134,9 @@ public final class plasmaHTCache {
File dbfile = new File(this.cachePath, "responseHeader.db");
try {
if (dbfile.exists())
- this.responseHeaderDB = new kelondroMap(new kelondroDyn(dbfile, bufferkb * 0x400));
+ this.responseHeaderDB = new kelondroMap(new kelondroDyn(dbfile, bufferkb * 0x400, '#'));
else
- this.responseHeaderDB = new kelondroMap(new kelondroDyn(dbfile, bufferkb * 0x400, plasmaURL.urlHashLength, 150, false));
+ this.responseHeaderDB = new kelondroMap(new kelondroDyn(dbfile, bufferkb * 0x400, plasmaURL.urlHashLength, 150, '#', false));
} catch (IOException e) {
this.log.logSevere("the request header database could not be opened: " + e.getMessage());
System.exit(0);
diff --git a/source/de/anomic/plasma/plasmaWordConnotation.java b/source/de/anomic/plasma/plasmaWordConnotation.java
index 81bb96025..ad31f89ff 100644
--- a/source/de/anomic/plasma/plasmaWordConnotation.java
+++ b/source/de/anomic/plasma/plasmaWordConnotation.java
@@ -58,13 +58,13 @@ public class plasmaWordConnotation {
private static final int nodesize = 4048;
private kelondroDynTree refDB;
- public plasmaWordConnotation(File refDBfile, int bufferkb) {
+ public plasmaWordConnotation(File refDBfile, int bufferkb, char fillChar) {
if (refDBfile.exists()) try {
- refDB = new kelondroDynTree(refDBfile, bufferkb * 0x400);
+ refDB = new kelondroDynTree(refDBfile, bufferkb * 0x400, fillChar);
} catch (IOException e) {
- refDB = new kelondroDynTree(refDBfile, bufferkb * 0x400, wordlength, nodesize, new int[] {wordlength, countlength}, true);
+ refDB = new kelondroDynTree(refDBfile, bufferkb * 0x400, wordlength, nodesize, new int[] {wordlength, countlength}, fillChar, true);
} else {
- refDB = new kelondroDynTree(refDBfile, bufferkb * 0x400, wordlength, nodesize, new int[] {wordlength, countlength}, true);
+ refDB = new kelondroDynTree(refDBfile, bufferkb * 0x400, wordlength, nodesize, new int[] {wordlength, countlength}, fillChar, true);
}
}
diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java
index b89c63e1f..eb1f3be38 100644
--- a/source/de/anomic/yacy/yacySeedDB.java
+++ b/source/de/anomic/yacy/yacySeedDB.java
@@ -187,7 +187,7 @@ public final class yacySeedDB {
private synchronized kelondroMap openSeedTable(File seedDBFile) {
if (seedDBFile.exists()) try {
// open existing seed database
- return new kelondroMap(new kelondroDyn(seedDBFile, (seedDBBufferKB * 0x400) / 3), sortFields, accFields);
+ return new kelondroMap(new kelondroDyn(seedDBFile, (seedDBBufferKB * 0x400) / 3, '#'), sortFields, accFields);
} catch (kelondroException e) {
// if we have an error, we start with a fresh database
if (seedDBFile.exists()) seedDBFile.delete();
@@ -197,7 +197,7 @@ public final class yacySeedDB {
}
// create new seed database
new File(seedDBFile.getParent()).mkdir();
- return new kelondroMap(new kelondroDyn(seedDBFile, (seedDBBufferKB * 0x400) / 3, commonHashLength, 480, true), sortFields, accFields);
+ return new kelondroMap(new kelondroDyn(seedDBFile, (seedDBBufferKB * 0x400) / 3, commonHashLength, 480, '#', true), sortFields, accFields);
}
private synchronized kelondroMap resetSeedTable(kelondroMap seedDB, File seedDBFile) {
diff --git a/source/yacy.java b/source/yacy.java
index 4ed2351fe..652e64f47 100644
--- a/source/yacy.java
+++ b/source/yacy.java
@@ -1396,7 +1396,7 @@ public final class yacy {
String[] dbFileNames = {"seed.new.db","seed.old.db","seed.pot.db"};
for (int i=0; i < dbFileNames.length; i++) {
File dbFile = new File(yacyDBPath,dbFileNames[i]);
- kelondroMap db = new kelondroMap(new kelondroDyn(dbFile, (1024 * 0x400) / 3), yacySeedDB.sortFields, yacySeedDB.accFields);
+ kelondroMap db = new kelondroMap(new kelondroDyn(dbFile, (1024 * 0x400) / 3, '#'), yacySeedDB.sortFields, yacySeedDB.accFields);
kelondroMap.mapIterator it;
it = db.maps(true, false);