mirror of https://github.com/apache/lucene.git
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:
parent
625923e1f3
commit
68308f1438
|
@ -137,6 +137,9 @@ Changes in Runtime Behavior
|
|||
spans that were previously discarded in preference to shorter
|
||||
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
|
||||
|
||||
* LUCENE-6518: Don't report false thread leaks from IBM J9
|
||||
|
|
|
@ -3778,6 +3778,10 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
diagnostics.put("os.version", Constants.OS_VERSION);
|
||||
diagnostics.put("java.version", Constants.JAVA_VERSION);
|
||||
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()));
|
||||
if (details != null) {
|
||||
diagnostics.putAll(details);
|
||||
|
|
|
@ -93,6 +93,9 @@ public class TestCheckIndex extends LuceneTestCase {
|
|||
assertEquals(18, seg.termVectorStatus.docCount);
|
||||
assertEquals(18, seg.termVectorStatus.totVectors);
|
||||
|
||||
assertNotNull(seg.diagnostics.get("java.vm.version"));
|
||||
assertNotNull(seg.diagnostics.get("java.runtime.version"));
|
||||
|
||||
assertTrue(seg.diagnostics.size() > 0);
|
||||
final List<String> onlySegments = new ArrayList<>();
|
||||
onlySegments.add("_0");
|
||||
|
|
Loading…
Reference in New Issue