Fix jvm options handling in testclusters < 6.2
This commit is contained in:
parent
c4773a4949
commit
4540610b62
|
@ -1214,14 +1214,15 @@ public class ElasticsearchNode implements TestClusterConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> jvmOptionExpansions() {
|
private Map<String, String> jvmOptionExpansions() {
|
||||||
String heapDumpOrigin = getVersion().onOrAfter("6.3.0") ? "-XX:HeapDumpPath=data" : "-XX:HeapDumpPath=/heap/dump/path";
|
|
||||||
Map<String, String> expansions = new HashMap<>();
|
Map<String, String> expansions = new HashMap<>();
|
||||||
expansions.putAll(
|
Version version = getVersion();
|
||||||
Map.of(heapDumpOrigin, "-XX:HeapDumpPath=" + confPathLogs.toString(), "logs/gc.log", confPathLogs.resolve("gc.log").toString())
|
String heapDumpOrigin = getVersion().onOrAfter("6.3.0") ? "-XX:HeapDumpPath=data" : "-XX:HeapDumpPath=/heap/dump/path";
|
||||||
);
|
expansions.put(heapDumpOrigin, "-XX:HeapDumpPath=" + confPathLogs.toString());
|
||||||
|
if (version.onOrAfter("6.2.0")) {
|
||||||
|
expansions.put("logs/gc.log", confPathLogs.resolve("gc.log").toString());
|
||||||
|
}
|
||||||
if (getVersion().getMajor() >= 7) {
|
if (getVersion().getMajor() >= 7) {
|
||||||
expansions.put("-XX:ErrorFile=logs/hs_err_pid%p.log", "-XX:ErrorFile=" + confPathLogs.resolve("hs_err_pid%p.log").toString());
|
expansions.put("-XX:ErrorFile=logs/hs_err_pid%p.log", "-XX:ErrorFile=" + confPathLogs.resolve("hs_err_pid%p.log").toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
return expansions;
|
return expansions;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue