LUCENE-6538: improve per-segment diagnostics for IBM's J9 JVM

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1685121 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2015-06-12 16:22:36 +00:00
parent 625923e1f3
commit 68308f1438
3 changed files with 10 additions and 0 deletions

View File

@ -137,6 +137,9 @@ Changes in Runtime Behavior
spans that were previously discarded in preference to shorter spans that were previously discarded in preference to shorter
overlapping ones. (Alan Woodward, Adrien Grand, Paul Elschot) overlapping ones. (Alan Woodward, Adrien Grand, Paul Elschot)
* LUCENE-6538: Also include java.vm.version and java.runtime.version
in per-segment diagnostics (Robert Muir, Mike McCandless)
Build Build
* LUCENE-6518: Don't report false thread leaks from IBM J9 * LUCENE-6518: Don't report false thread leaks from IBM J9

View File

@ -3778,6 +3778,10 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
diagnostics.put("os.version", Constants.OS_VERSION); diagnostics.put("os.version", Constants.OS_VERSION);
diagnostics.put("java.version", Constants.JAVA_VERSION); diagnostics.put("java.version", Constants.JAVA_VERSION);
diagnostics.put("java.vendor", Constants.JAVA_VENDOR); diagnostics.put("java.vendor", Constants.JAVA_VENDOR);
// On IBM J9 JVM this is better than java.version which is just 1.7.0 (no update level):
diagnostics.put("java.runtime.version", System.getProperty("java.runtime.version", "undefined"));
// Hotspot version, e.g. 2.8 for J9:
diagnostics.put("java.vm.version", System.getProperty("java.vm.version", "undefined"));
diagnostics.put("timestamp", Long.toString(new Date().getTime())); diagnostics.put("timestamp", Long.toString(new Date().getTime()));
if (details != null) { if (details != null) {
diagnostics.putAll(details); diagnostics.putAll(details);

View File

@ -93,6 +93,9 @@ public class TestCheckIndex extends LuceneTestCase {
assertEquals(18, seg.termVectorStatus.docCount); assertEquals(18, seg.termVectorStatus.docCount);
assertEquals(18, seg.termVectorStatus.totVectors); assertEquals(18, seg.termVectorStatus.totVectors);
assertNotNull(seg.diagnostics.get("java.vm.version"));
assertNotNull(seg.diagnostics.get("java.runtime.version"));
assertTrue(seg.diagnostics.size() > 0); assertTrue(seg.diagnostics.size() > 0);
final List<String> onlySegments = new ArrayList<>(); final List<String> onlySegments = new ArrayList<>();
onlySegments.add("_0"); onlySegments.add("_0");