private static void fromJvmDotOptionsFile(File tmpDir, Map<String, String> res) {
// GC configuration
- res.put("-XX:+UseConcMarkSweepGC", "");
res.put("-XX:CMSInitiatingOccupancyFraction=", "75");
res.put("-XX:+UseCMSInitiatingOccupancyOnly", "");
assertThat(esConfig.getHttpPort()).isEqualTo(9001);
assertThat(esConfig.getEsJvmOptions().getAll())
// enforced values
- .contains("-XX:+UseConcMarkSweepGC", "-Dfile.encoding=UTF-8")
+ .contains("-Dfile.encoding=UTF-8")
// default settings
.contains("-Xms512m", "-Xmx512m", "-XX:+HeapDumpOnOutOfMemoryError");
assertThat(esConfig.getEsYmlSettings()).isNotNull();
assertThat(esConfig.getHttpPort()).isEqualTo(9001);
assertThat(esConfig.getEsJvmOptions().getAll())
// enforced values
- .contains("-XX:+UseConcMarkSweepGC", "-Dfile.encoding=UTF-8")
+ .contains("-Dfile.encoding=UTF-8")
// default settings
.contains("-Xms512m", "-Xmx512m", "-XX:+HeapDumpOnOutOfMemoryError");
assertThat(esConfig.getEsYmlSettings()).isNotNull();
assertThat(esConfig.getHttpPort()).isEqualTo(1234);
assertThat(esConfig.getEsJvmOptions().getAll())
// enforced values
- .contains("-XX:+UseConcMarkSweepGC", "-Dfile.encoding=UTF-8")
+ .contains("-Dfile.encoding=UTF-8")
.contains("-Djava.io.tmpdir=" + tempDir.getAbsolutePath())
// user settings
.contains("-Xms10G", "-Xmx10G")
assertThat(underTest.getAll())
.containsExactly(
- "-XX:+UseConcMarkSweepGC",
"-XX:CMSInitiatingOccupancyFraction=75",
"-XX:+UseCMSInitiatingOccupancyOnly",
"-Djava.io.tmpdir=" + tmpDir.getAbsolutePath(),
"\n" +
"# DO NOT EDIT THIS FILE\n" +
"\n" +
- "-XX:+UseConcMarkSweepGC\n" +
"-XX:CMSInitiatingOccupancyFraction=75\n" +
"-XX:+UseCMSInitiatingOccupancyOnly\n" +
"-Djava.io.tmpdir=" + tmpDir.getAbsolutePath() + "\n" +
fcd.relativePath = new RelativePath(true, *path)
}
into("${archiveDir}/elasticsearch")
+ filesMatching('**/bin/elasticsearch-env') {
+ // to avoid warning logs
+ filter { line -> line.replaceAll('echo "warning: no-jdk distributions.*', ':') }
+ }
// elasticsearch script will be replaced by patched version below
exclude '**/bin/elasticsearch'
exclude '**/bin/elasticsearch-cli'