Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
better logging when writing merged dumps
orbiter33aafa9b4b56
diff --git a/source/de/anomic/kelondro/blob/HeapWriter.java b/source/de/anomic/kelondro/blob/HeapWriter.javaindex 3567b6d02..02557e675 100644--- a/source/de/anomic/kelondro/blob/HeapWriter.java+++ b/source/de/anomic/kelondro/blob/HeapWriter.java@@ -154,21 +154,17 @@ public final class HeapWriter {if (writeIDX && index.size() > 3) {// now we can create a dump of the index and the gap information// to speed up the next start- try {- long start = System.currentTimeMillis();- String fingerprint = HeapWriter.fingerprintFileHash(this.heapFileREADY);- if (fingerprint == null) {- Log.logSevere("kelondroBLOBHeapWriter", "cannot write a dump for " + heapFileREADY.getName()+ ": fingerprint is null");- } else {- new Gap().dump(fingerprintGapFile(this.heapFileREADY, fingerprint));- index.dump(fingerprintIndexFile(this.heapFileREADY, fingerprint));- Log.logInfo("kelondroBLOBHeapWriter", "wrote a dump for the " + this.index.size() + " index entries of " + heapFileREADY.getName()+ " in " + (System.currentTimeMillis() - start) + " milliseconds.");- }- index.close();- index = null;- } catch (IOException e) {- e.printStackTrace();+ long start = System.currentTimeMillis();+ String fingerprint = HeapWriter.fingerprintFileHash(this.heapFileREADY);+ if (fingerprint == null) {+ Log.logSevere("kelondroBLOBHeapWriter", "cannot write a dump for " + heapFileREADY.getName()+ ": fingerprint is null");+ } else {+ new Gap().dump(fingerprintGapFile(this.heapFileREADY, fingerprint));+ index.dump(fingerprintIndexFile(this.heapFileREADY, fingerprint));+ Log.logInfo("kelondroBLOBHeapWriter", "wrote a dump for the " + this.index.size() + " index entries of " + heapFileREADY.getName()+ " in " + (System.currentTimeMillis() - start) + " milliseconds.");}+ index.close();+ index = null;} else {// this is small.. just free resources, do not write indexindex.close();diff --git a/source/de/anomic/kelondro/text/ReferenceContainerCache.java b/source/de/anomic/kelondro/text/ReferenceContainerCache.javaindex f5f23c1b1..6732e1e7b 100644--- a/source/de/anomic/kelondro/text/ReferenceContainerCache.java+++ b/source/de/anomic/kelondro/text/ReferenceContainerCache.java@@ -133,8 +133,7 @@ public final class ReferenceContainerCache<ReferenceType extends Reference> extedump.close(true);Log.logInfo("indexContainerRAMHeap", "finished rwi heap dump: " + wordcount + " words, " + urlcount + " word/URL relations in " + (System.currentTimeMillis() - startTime) + " milliseconds");} catch (IOException e) {- e.printStackTrace();- Log.logInfo("indexContainerRAMHeap", "failed rwi heap dump: " + e.getMessage());+ Log.logSevere("indexContainerRAMHeap", "failed rwi heap dump: " + e.getMessage(), e);} finally {dump = null;}