Author: orbiter Date: 2008-01-22 21:02:20 +0100 (Tue, 22 Jan 2008) New Revision: 4366
Modified: trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java trunk/source/de/anomic/kelondro/kelondroEcoTable.java trunk/source/de/anomic/kelondro/kelondroRAMIndex.java Log: some fixes to bring back lulabads peer.. see also: http://forum.yacy-websuche.de/viewtopic.php?p=4772#p4772 Modified: trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java =================================================================== --- trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java 2008-01-22 19:59:21 UTC (rev 4365) +++ trunk/source/de/anomic/kelondro/kelondroCollectionIndex.java 2008-01-22 20:02:20 UTC (rev 4366) @@ -153,7 +153,7 @@ continue; } } - serverLog.logFine("STARTUP", "STARTED INITIALIZATION OF NEW COLLECTION INDEX WITH " + initialSpace + " ENTRIES. THIS WILL TAKE SOME TIME"); + serverLog.logFine("STARTUP", "STARTED INITIALIZATION OF NEW COLLECTION INDEX WITH " + initialSpace + " ENTRIES. THIS WILL TAKE SOME TIME. " + (serverMemory.available() / 1024 / 1024) + "MB AVAILABLE."); kelondroRow indexRowdef = indexRow(keyLength, indexOrder); long necessaryRAM4fullTable = minimumRAM4Eco + (indexRowdef.objectsize + 4) * initialSpace * 3 / 2; long necessaryRAM4fullIndex = minimumRAM4Eco + (indexRowdef.primaryKeyLength + 4) * initialSpace * 3 / 2; Modified: trunk/source/de/anomic/kelondro/kelondroEcoTable.java =================================================================== --- trunk/source/de/anomic/kelondro/kelondroEcoTable.java 2008-01-22 19:59:21 UTC (rev 4365) +++ trunk/source/de/anomic/kelondro/kelondroEcoTable.java 2008-01-22 20:02:20 UTC (rev 4366) @@ -76,7 +76,7 @@ for (int i = 0; i < cols.length; i++) { cols[i] = rowdef.column(i + 1); } - this.taildef = new kelondroRow(cols, kelondroNaturalOrder.naturalOrder, rowdef.primaryKeyIndex); + this.taildef = new kelondroRow(cols, kelondroNaturalOrder.naturalOrder, -1); // initialize table file if (!tablefile.exists()) { @@ -97,11 +97,12 @@ // initialize index and copy table int records = (int) Math.max(file.size(), initialSpace); - long neededRAM4table = 10 * 1024 * 1024 + records * (rowdef.objectsize + 4) * 3 / 2; + long neededRAM4table = 200 * 1024 * 1024 + records * (rowdef.objectsize + 4) * 3 / 2; table = ((neededRAM4table < maxarraylength) && ((useTailCache == tailCacheForceUsage) || - ((useTailCache == tailCacheUsageAuto) && (serverMemory.request(neededRAM4table, true))))) ? + ((useTailCache == tailCacheUsageAuto) && (serverMemory.request(neededRAM4table, false))))) ? new kelondroRowSet(taildef, records) : null; + System.out.println("*** DEBUG: available RAM: " + (serverMemory.available() / 1024 / 1024) + "MB, allocating space for " + records + " entries"); index = new kelondroBytesIntMap(rowdef.primaryKeyLength, rowdef.objectOrder, records); System.out.println("*** DEBUG: EcoTable " + tablefile.toString() + " has table copy " + ((table == null) ? "DISABLED" : "ENABLED")); Modified: trunk/source/de/anomic/kelondro/kelondroRAMIndex.java =================================================================== --- trunk/source/de/anomic/kelondro/kelondroRAMIndex.java 2008-01-22 19:59:21 UTC (rev 4365) +++ trunk/source/de/anomic/kelondro/kelondroRAMIndex.java 2008-01-22 20:02:20 UTC (rev 4366) @@ -48,6 +48,7 @@ } public void reset(int initialspace) { + this.index0 = null; // first flush RAM to make room this.index0 = new kelondroRowSet(rowdef, initialspace); this.index1 = null; // to show that this is the initialization phase } _______________________________________________ YaCy-svn mailing list [email protected] https://lists.berlios.de/mailman/listinfo/yacy-svn
