print codec when IW.infoStream is enabled

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@980398 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-07-29 11:03:24 +00:00
parent 04cdd6c249
commit 747a1c2d8f
1 changed files with 8 additions and 1 deletions

View File

@ -3341,6 +3341,9 @@ public class IndexWriter implements Closeable {
docWriter.hasProx(),
docWriter.getCodec());
if (infoStream != null) {
message("flush codec=" + docWriter.getCodec().name);
}
setDiagnostics(newSegment, "flush");
}
@ -3642,7 +3645,7 @@ public class IndexWriter implements Closeable {
} catch (OutOfMemoryError oom) {
handleOOM(oom, "merge");
}
if (infoStream != null) {
if (infoStream != null && merge.info != null) {
message("merge time " + (System.currentTimeMillis()-t0) + " msec for " + merge.info.docCount + " docs");
}
}
@ -4025,6 +4028,10 @@ public class IndexWriter implements Closeable {
// Record which codec was used to write the segment
merge.info.setCodec(merger.getCodec());
if (infoStream != null) {
message("merge codec=" + merger.getCodec().name);
}
assert mergedDocCount == totDocCount;