- more logging

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4368 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent d288987a93
commit 634430c48a

@ -358,7 +358,7 @@ public class Bookmarks {
tag=(Tag) it.next(); tag=(Tag) it.next();
if (tag.getFriendlyName().startsWith("/")) { if (tag.getFriendlyName().startsWith("/")) {
path = tag.getFriendlyName(); path = tag.getFriendlyName();
while(!path.equals("")){ while(path.length() > 0){
folders.add(path); folders.add(path);
path = path.replaceAll("(/.[^/]*$)", ""); path = path.replaceAll("(/.[^/]*$)", "");
serverLog.logInfo("BOOKMARKS", "Path: "+path+" added to folder list.\n"); serverLog.logInfo("BOOKMARKS", "Path: "+path+" added to folder list.\n");

@ -102,9 +102,18 @@ public class kelondroEcoTable implements kelondroIndex {
((useTailCache == tailCacheForceUsage) || ((useTailCache == tailCacheForceUsage) ||
((useTailCache == tailCacheUsageAuto) && (serverMemory.request(neededRAM4table, false))))) ? ((useTailCache == tailCacheUsageAuto) && (serverMemory.request(neededRAM4table, false))))) ?
new kelondroRowSet(taildef, records) : null; new kelondroRowSet(taildef, records) : null;
System.out.println("*** DEBUG: available RAM: " + (serverMemory.available() / 1024 / 1024) + "MB, allocating space for " + records + " entries"); System.out.println("*** DEBUG " + tablefile + ": available RAM: " + (serverMemory.available() / 1024 / 1024) + "MB, allocating space for " + records + " entries");
long neededRAM4index = 200 * 1024 * 1024 + records * (rowdef.primaryKeyLength + 4) * 3 / 2;
if (!serverMemory.request(neededRAM4index, false)) {
// despite calculations seemed to show that there is enough memory for the table AND the index
// there is now not enough memory left for the index. So delete the table again to free the memory
// for the index
System.out.println("*** DEBUG " + tablefile + ": not enough RAM (" + (serverMemory.available() / 1024 / 1024) + "MB) left for index, deleting allocated table space to enable index space allocation (needed: " + (neededRAM4index / 1024 / 1024) + "MB)");
table = null; System.gc();
System.out.println("*** DEBUG " + tablefile + ": RAM after releasing the table: " + (serverMemory.available() / 1024 / 1024) + "MB");
}
index = new kelondroBytesIntMap(rowdef.primaryKeyLength, rowdef.objectOrder, records); index = new kelondroBytesIntMap(rowdef.primaryKeyLength, rowdef.objectOrder, records);
System.out.println("*** DEBUG: EcoTable " + tablefile.toString() + " has table copy " + ((table == null) ? "DISABLED" : "ENABLED")); System.out.println("*** DEBUG " + tablefile + ": EcoTable " + tablefile.toString() + " has table copy " + ((table == null) ? "DISABLED" : "ENABLED"));
// read all elements from the file into the copy table // read all elements from the file into the copy table
byte[] record = new byte[rowdef.objectsize]; byte[] record = new byte[rowdef.objectsize];
@ -124,7 +133,7 @@ public class kelondroEcoTable implements kelondroIndex {
// check consistency // check consistency
ArrayList<Integer[]> doubles = index.removeDoubles(); ArrayList<Integer[]> doubles = index.removeDoubles();
if (doubles.size() > 0) { if (doubles.size() > 0) {
System.out.println("DEBUG: WARNING - EcoTable " + tablefile + " has " + doubles.size() + " doubles"); System.out.println("DEBUG " + tablefile + ": WARNING - EcoTable " + tablefile + " has " + doubles.size() + " doubles");
} }
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
// should never happen // should never happen

Loading…
Cancel
Save