Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce jvm.options.d for customizing JVM options #51882

Merged
merged 32 commits into from
Feb 8, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
386de64
Introduce jvm.options.d for customizing JVM options
jasontedor Feb 4, 2020
e8a1685
Do not encourage editing root jvm.options file
jasontedor Feb 4, 2020
98a315c
Remove unneeded method
jasontedor Feb 4, 2020
50b7090
Fix javadoc
jasontedor Feb 4, 2020
ef7c11c
Update heap size docs
jasontedor Feb 4, 2020
72c2ceb
Update docs/reference/setup/jvm-options.asciidoc
jasontedor Feb 4, 2020
e609aad
Fix imports
jasontedor Feb 4, 2020
57e29ec
Merge branch 'master' into jvm.options.d
elasticmachine Feb 4, 2020
7c5da0a
Create jvm.options.d in Docker image
jasontedor Feb 5, 2020
7d4f151
Do not require existence
jasontedor Feb 5, 2020
d388d85
Merge branch 'master' into jvm.options.d
elasticmachine Feb 6, 2020
454a899
Merge branch 'master' into jvm.options.d
jasontedor Feb 6, 2020
5738f71
Update Docker docs
jasontedor Feb 6, 2020
3a2bf7b
Fix static import
jasontedor Feb 6, 2020
ccb522c
Cleanup docs
jasontedor Feb 6, 2020
e0b1f32
Remove filename
jasontedor Feb 6, 2020
fa13f95
Simplify and require .options
jasontedor Feb 6, 2020
0bc68bd
Remove lexicographic processing
jasontedor Feb 6, 2020
6695f75
Unspecified processing order
jasontedor Feb 6, 2020
e5ea0c3
Now sort
jasontedor Feb 6, 2020
5b2c725
Cleanup
jasontedor Feb 6, 2020
886b1a2
Formatting
jasontedor Feb 6, 2020
53e7073
Merge branch 'master' into jvm.options.d
elasticmachine Feb 7, 2020
34dc1d7
Add test, fix permissions?
jasontedor Feb 7, 2020
e2fe7fc
Add permissions check
jasontedor Feb 7, 2020
3977275
Fix lintian
jasontedor Feb 7, 2020
c7e8cca
Fix ordering of test
jasontedor Feb 7, 2020
69d8c31
Fix some tests
jasontedor Feb 7, 2020
70a0e6c
Merge branch 'master' into jvm.options.d
jasontedor Feb 8, 2020
7fd24a3
Merge branch 'master' into jvm.options.d
jasontedor Feb 8, 2020
7f02018
Update jvm.options.d config file packaging
jasontedor Feb 8, 2020
9a0bb16
Properly purge on Debian
jasontedor Feb 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ task createPluginsDir(type: EmptyDirTask) {
dir = "${pluginsDir}"
dirMode = 0755
}
ext.jvmOptionsDir = new File(buildDir, 'jvm-options-hack/jvm.options.d')
jasontedor marked this conversation as resolved.
Show resolved Hide resolved
task createJvmOptionsDir(type: EmptyDirTask) {
dir = "${jvmOptionsDir}"
dirMode = 0750
}

CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String platform, boolean oss, boolean jdk) {
return copySpec {
Expand All @@ -55,6 +60,10 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
dirMode 0750
fileMode 0660
with configFiles(distributionType, oss, jdk)
from {
dirMode 0750
jvmOptionsDir.getParent()
}
}
into('bin') {
with binFiles(distributionType, oss, jdk)
Expand Down Expand Up @@ -94,7 +103,7 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla

// common config across all zip/tar
tasks.withType(AbstractArchiveTask) {
dependsOn createLogsDir, createPluginsDir
dependsOn createLogsDir, createPluginsDir, createJvmOptionsDir
String subdir = it.name.substring('build'.size()).replaceAll(/[A-Z]/) { '-' + it.toLowerCase() }.substring(1)
destinationDir = file("${subdir}/build/distributions")
baseName = "elasticsearch${subdir.contains('oss') ? '-oss' : ''}"
Expand Down
3 changes: 2 additions & 1 deletion distribution/packages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ void addProcessFilesTask(String type, boolean oss, boolean jdk) {
mkdir "${packagingFiles}/usr/share/elasticsearch/plugins"

// bare empty dir for /etc/elasticsearch
mkdir "${packagingFiles}/elasticsearch"
mkdir "${packagingFiles}/etc/elasticsearch"
mkdir "${packagingFiles}/etc/elasticsearch/jvm.options.d"
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions distribution/packages/src/common/scripts/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ else
fi

REMOVE_DIRS=false
REMOVE_JVM_OPTIONS_DIRECTORY=false
REMOVE_USER_AND_GROUP=false

case "$1" in
Expand All @@ -27,6 +28,7 @@ case "$1" in
;;

purge)
REMOVE_JVM_OPTIONS_DIRECTORY=true
REMOVE_USER_AND_GROUP=true
;;
failed-upgrade|abort-install|abort-upgrade|disappear|upgrade|disappear)
Expand Down Expand Up @@ -87,6 +89,14 @@ if [ "$REMOVE_DIRS" = "true" ]; then

fi

if [ "$REMOVE_JVM_OPTIONS_DIRECTORY" = "true" ]; then
if [ -d /etc/elasticsearch/jvm.options.d ]; then
echo -n "Deleting jvm.options.d directory..."
rm -rf /etc/elasticsearch/jvm.options.d
echo " OK"
fi
fi

if [ "$REMOVE_USER_AND_GROUP" = "true" ]; then
if id elasticsearch > /dev/null 2>&1 ; then
userdel elasticsearch
Expand Down
3 changes: 1 addition & 2 deletions distribution/src/bin/elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ then
fi
fi

ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
ES_JAVA_OPTS=`export ES_TMPDIR; "$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_JVM_OPTIONS"`
ES_JAVA_OPTS=`export ES_TMPDIR; "$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_PATH_CONF"`

# manual parsing to find out, if process should be detached
if [[ $DAEMONIZE = false ]]; then
Expand Down
8 changes: 4 additions & 4 deletions distribution/src/bin/elasticsearch-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ set ES_JVM_OPTIONS=%ES_PATH_CONF%\jvm.options
if not "%ES_JAVA_OPTS%" == "" set ES_JAVA_OPTS=%ES_JAVA_OPTS: =;%

@setlocal
for /F "usebackq delims=" %%a in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_JVM_OPTIONS!" || echo jvm_options_parser_failed"`) do set ES_JAVA_OPTS=%%a
for /F "usebackq delims=" %%a in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_PATH_CONF!" || echo jvm_options_parser_failed"`) do set ES_JAVA_OPTS=%%a
@endlocal & set "MAYBE_JVM_OPTIONS_PARSER_FAILED=%ES_JAVA_OPTS%" & set ES_JAVA_OPTS=%ES_JAVA_OPTS%

if "%MAYBE_JVM_OPTIONS_PARSER_FAILED%" == "jvm_options_parser_failed" (
Expand Down Expand Up @@ -167,15 +167,15 @@ for %%a in ("%ES_JAVA_OPTS:;=","%") do (
@endlocal & set JVM_MS=%JVM_MS% & set JVM_MX=%JVM_MX% & set JVM_SS=%JVM_SS% & set OTHER_JAVA_OPTS=%OTHER_JAVA_OPTS%

if "%JVM_MS%" == "" (
echo minimum heap size not set; configure using -Xms via "%ES_JVM_OPTIONS%" or ES_JAVA_OPTS
echo minimum heap size not set; configure using -Xms via "%ES_PATH_CONF%/jvm.options.d", or ES_JAVA_OPTS
goto:eof
)
if "%JVM_MX%" == "" (
echo maximum heap size not set; configure using -Xmx via "%ES_JVM_OPTIONS%" or ES_JAVA_OPTS
echo maximum heap size not set; configure using -Xmx via "%ES_PATH_CONF%/jvm.options.d", or ES_JAVA_OPTS
goto:eof
)
if "%JVM_SS%" == "" (
echo thread stack size not set; configure using -Xss via "%ES_JVM_OPTIONS%" or ES_JAVA_OPTS
echo thread stack size not set; configure using -Xss via "%ES_PATH_CONF%/jvm.options.d", or ES_JAVA_OPTS
goto:eof
)
set OTHER_JAVA_OPTS=%OTHER_JAVA_OPTS:"=%
Expand Down
3 changes: 1 addition & 2 deletions distribution/src/bin/elasticsearch.bat
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ if not defined ES_TMPDIR (
for /f "tokens=* usebackq" %%a in (`CALL %JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.TempDirectory"`) do set ES_TMPDIR=%%a
)

set ES_JVM_OPTIONS=%ES_PATH_CONF%\jvm.options
@setlocal
for /F "usebackq delims=" %%a in (`CALL %JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_JVM_OPTIONS!" ^|^| echo jvm_options_parser_failed`) do set ES_JAVA_OPTS=%%a
for /F "usebackq delims=" %%a in (`CALL %JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_PATH_CONF!" ^|^| echo jvm_options_parser_failed`) do set ES_JAVA_OPTS=%%a
@endlocal & set "MAYBE_JVM_OPTIONS_PARSER_FAILED=%ES_JAVA_OPTS%" & set ES_JAVA_OPTS=%ES_JAVA_OPTS%

if "%MAYBE_JVM_OPTIONS_PARSER_FAILED%" == "jvm_options_parser_failed" (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
import java.nio.file.FileVisitor;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -43,6 +47,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

/**
* Parses JVM options from a file and prints a single line with all JVM options to standard output.
Expand All @@ -57,78 +63,80 @@ final class JvmOptionsParser {
*/
public static void main(final String[] args) throws InterruptedException, IOException {
if (args.length != 1) {
throw new IllegalArgumentException("expected one argument specifying path to jvm.options but was " + Arrays.toString(args));
throw new IllegalArgumentException("expected one argument specifying path to ES_PATH_CONF but was " + Arrays.toString(args));
}

final Stream<Path> jvmOptionsFiles;
jasontedor marked this conversation as resolved.
Show resolved Hide resolved
{
final Stream<Path> jvmOptionsDirectoryFiles = Files.list(Paths.get(args[0], "jvm.options.d"));
jasontedor marked this conversation as resolved.
Show resolved Hide resolved
jvmOptionsFiles = Stream.concat(Stream.of(Paths.get(args[0], "jvm.options")), jvmOptionsDirectoryFiles.sorted())
.onClose(jvmOptionsDirectoryFiles::close);
}

final List<String> jvmOptions = new ArrayList<>();
final SortedMap<Integer, String> invalidLines = new TreeMap<>();
try (
InputStream is = Files.newInputStream(Paths.get(args[0]));
Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8);
BufferedReader br = new BufferedReader(reader)
) {
parse(JavaVersion.majorVersion(JavaVersion.CURRENT), br, new JvmOptionConsumer() {
@Override
public void accept(final String jvmOption) {
jvmOptions.add(jvmOption);
try (jvmOptionsFiles) {
for (final Path jvmOptionsFile : (Iterable<Path>) jvmOptionsFiles::iterator) {
final SortedMap<Integer, String> invalidLines = new TreeMap<>();
try (
InputStream is = Files.newInputStream(jvmOptionsFile);
Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8);
BufferedReader br = new BufferedReader(reader)
) {
parse(JavaVersion.majorVersion(JavaVersion.CURRENT), br, jvmOptions::add, invalidLines::put);
}
}, new InvalidLineConsumer() {
@Override
public void accept(final int lineNumber, final String line) {
invalidLines.put(lineNumber, line);
if (invalidLines.isEmpty() == false) {
final String errorMessage = String.format(
Locale.ROOT,
"encountered [%d] error%s parsing [%s]",
invalidLines.size(),
invalidLines.size() == 1 ? "" : "s",
jvmOptionsFile
);
Launchers.errPrintln(errorMessage);
int count = 0;
for (final Map.Entry<Integer, String> entry : invalidLines.entrySet()) {
count++;
final String message = String.format(
Locale.ROOT,
"[%d]: encountered improperly formatted JVM option in [%s] on line number [%d]: [%s]",
count,
jvmOptionsFile,
entry.getKey(),
entry.getValue()
);
Launchers.errPrintln(message);
}
Launchers.exit(1);
}
});
}
}

if (invalidLines.isEmpty()) {
// now append the JVM options from ES_JAVA_OPTS
final String environmentJvmOptions = System.getenv("ES_JAVA_OPTS");
if (environmentJvmOptions != null) {
jvmOptions.addAll(
Arrays.stream(environmentJvmOptions.split("\\s+"))
.filter(Predicate.not(String::isBlank))
.collect(Collectors.toUnmodifiableList())
);
}
final Map<String, String> substitutions = new HashMap<>();
substitutions.put("ES_TMPDIR", System.getenv("ES_TMPDIR"));
if (null != System.getenv("ES_PATH_CONF")) {
substitutions.put("ES_PATH_CONF", System.getenv("ES_PATH_CONF"));
}
final List<String> substitutedJvmOptions = substitutePlaceholders(jvmOptions, Collections.unmodifiableMap(substitutions));
final List<String> ergonomicJvmOptions = JvmErgonomics.choose(substitutedJvmOptions);
final List<String> systemJvmOptions = SystemJvmOptions.systemJvmOptions();
final List<String> finalJvmOptions = new ArrayList<>(
systemJvmOptions.size() + substitutedJvmOptions.size() + ergonomicJvmOptions.size()
);
finalJvmOptions.addAll(systemJvmOptions); // add the system JVM options first so that they can be overridden
finalJvmOptions.addAll(substitutedJvmOptions);
finalJvmOptions.addAll(ergonomicJvmOptions);
final String spaceDelimitedJvmOptions = spaceDelimitJvmOptions(finalJvmOptions);
Launchers.outPrintln(spaceDelimitedJvmOptions);
Launchers.exit(0);
} else {
final String errorMessage = String.format(
Locale.ROOT,
"encountered [%d] error%s parsing [%s]",
invalidLines.size(),
invalidLines.size() == 1 ? "" : "s",
args[0]
// now append the JVM options from ES_JAVA_OPTS
final String environmentJvmOptions = System.getenv("ES_JAVA_OPTS");
if (environmentJvmOptions != null) {
jvmOptions.addAll(
Arrays.stream(environmentJvmOptions.split("\\s+"))
.filter(Predicate.not(String::isBlank))
.collect(Collectors.toUnmodifiableList())
);
Launchers.errPrintln(errorMessage);
int count = 0;
for (final Map.Entry<Integer, String> entry : invalidLines.entrySet()) {
count++;
final String message = String.format(
Locale.ROOT,
"[%d]: encountered improperly formatted JVM option line [%s] on line number [%d]",
count,
entry.getValue(),
entry.getKey()
);
Launchers.errPrintln(message);
}
Launchers.exit(1);
}
final Map<String, String> substitutions = new HashMap<>();
substitutions.put("ES_TMPDIR", System.getenv("ES_TMPDIR"));
if (null != System.getenv("ES_PATH_CONF")) {
substitutions.put("ES_PATH_CONF", System.getenv("ES_PATH_CONF"));
}
final List<String> substitutedJvmOptions = substitutePlaceholders(jvmOptions, Collections.unmodifiableMap(substitutions));
final List<String> ergonomicJvmOptions = JvmErgonomics.choose(substitutedJvmOptions);
final List<String> systemJvmOptions = SystemJvmOptions.systemJvmOptions();
final List<String> finalJvmOptions = new ArrayList<>(
systemJvmOptions.size() + substitutedJvmOptions.size() + ergonomicJvmOptions.size()
);
finalJvmOptions.addAll(systemJvmOptions); // add the system JVM options first so that they can be overridden
finalJvmOptions.addAll(substitutedJvmOptions);
finalJvmOptions.addAll(ergonomicJvmOptions);
final String spaceDelimitedJvmOptions = spaceDelimitJvmOptions(finalJvmOptions);
Launchers.outPrintln(spaceDelimitedJvmOptions);
Launchers.exit(0);
}

static List<String> substitutePlaceholders(final List<String> jvmOptions, final Map<String, String> substitutions) {
Expand Down
27 changes: 17 additions & 10 deletions docs/reference/setup/jvm-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ You should rarely need to change Java Virtual Machine (JVM) options. If you do,
the most likely change is setting the <<heap-size,heap size>>. The remainder of
this document explains in detail how to set JVM options.

The preferred method of setting JVM options (including system properties and JVM
flags) is via the `jvm.options` configuration file. The default location of this
file is `config/jvm.options` (when installing from the tar or zip distributions)
and `/etc/elasticsearch/jvm.options` (when installing from the Debian or RPM
packages).
The preferred method of setting or overriding JVM options (including system
properties and JVM flags) is via custom JVM options files. The root
`jvm.options` configuration file is `config/jvm.options` and custom JVM options
files can be added to `config/jvm.options.d/` (when installing from the tar or
zip distributions), and `/etc/elasticsearch/jvm.options` and custom JVM options
files can be added to `/etc/elasticsearch/jvm.options.d/` (when installing from
the Debian or RPM packages). When using the
<<docker, Docker distribution of {es}>> you can bind mount these files into
`/usr/share/elasticsearch/config/jvm.options.d/`. You should never need to
modify the root `jvm.options` file instead preferring to use custom JVM options
files. Custom JVM options files are processed in lexicographic order (although
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This last sentence seems to be contradicting itself. Do we use lexicographic order, or is this non-deterministic? Lexicographic order is pretty strictly defined. If we are just iterating over a directory list (which it seems we are) then we shouldn't imply any kind of ordering guarantees. FWIW, it would be trivial for us to actually perform a sort here, which would allow folks to do stuff like 10_options and 00_options for layering overrides in a reliable way.

Copy link
Member Author

@jasontedor jasontedor Feb 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do sort them, see https://github.com/elastic/elasticsearch/pull/51882/files#diff-38516abb6f177c355f29699955e7e60eR68 in the implementation. However, this relies on the Path#compareTo implementation which explicitly says:

     * Compares two abstract paths lexicographically. The ordering defined by
     * this method is provider specific, and in the case of the default
     * provider, platform specific. This method does not access the file system
     * and neither file is required to exist.

"Provider" here refers to the filesystem provider. I am assuming (but did not investigate) this enables to account for odd sorting behavior such as on Windows via StrCmpLogicalW which sorts filenames by like f-1, f-2, f-10 in the order f-1, f-2, f-10 instead of f-1, f-10, f-2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm inclined to say that if this differs across providers we should even mention that it's lexicographic or not, or even perform the sort for that matter. If we do want to order, we should use a JDK implementation that isn't filesystem dependent, such as simply doing a String ordering using the filename. Which I think is effectively going to be what you described in your example.

the ordering is filesystem and platform specific).

This file contains a line-delimited list of JVM arguments following
a special syntax:
JVM options files contains line-delimited list of JVM arguments following a
jasontedor marked this conversation as resolved.
Show resolved Hide resolved
special syntax:

* lines consisting of whitespace only are ignored
* lines beginning with `#` are treated as comments and are ignored
Expand Down Expand Up @@ -58,8 +65,8 @@ a special syntax:

* all other lines are rejected

You can add custom JVM flags to this file and check this configuration into your
version control system.
You can add custom JVM flags to custom JVM options files and check these
jasontedor marked this conversation as resolved.
Show resolved Hide resolved
configuration files into your version control system.

An alternative mechanism for setting Java Virtual Machine options is via the
`ES_JAVA_OPTS` environment variable. For instance:
Expand All @@ -77,7 +84,7 @@ The JVM has a built-in mechanism for observing the `JAVA_TOOL_OPTIONS`
environment variable. We intentionally ignore this environment variable in our
packaging scripts. The primary reason for this is that on some OS (e.g., Ubuntu)
there are agents installed by default via this environment variable that we do
not want interfering with Elasticsearch.
not want interfering with {es}.

Additionally, some other Java programs support the `JAVA_OPTS` environment
variable. This is *not* a mechanism built into the JVM but instead a convention
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,46 @@ public void test70CustomPathConfAndJvmOptions() throws Exception {
}
}

public void test71CustomJvmOptionsDirectoryFile() throws Exception {
final Path heapOptions = installation.config(Paths.get("jvm.options.d", "heap.options"));
try {
append(heapOptions, "-Xms512m\n-Xmx512m\n");

startElasticsearch();

final String nodesResponse = makeRequest(Request.Get("http://localhost:9200/_nodes"));
assertThat(nodesResponse, containsString("\"heap_init_in_bytes\":536870912"));

stopElasticsearch();
} finally {
rm(heapOptions);
}
}

public void test72CustomJvmOptionsDirectoryFilesAreProcessedInSortedOrder() throws Exception {
final Path firstOptions = installation.config(Paths.get("jvm.options.d", "first.options"));
final Path secondOptions = installation.config(Paths.get("jvm.options.d", "second.options"));
jasontedor marked this conversation as resolved.
Show resolved Hide resolved
try {
/*
* We override the heap in the first file, and disable compressed oops, and override the heap in the second file. By doing this,
* we can test that both files are processed by the JVM options parser, and also that they are processed in lexicographic order.
*/
append(firstOptions, "-Xms384m\n-Xmx384m\n-XX:-UseCompressedOops\n");
append(secondOptions, "-Xms512m\n-Xmx512m\n");

startElasticsearch();

final String nodesResponse = makeRequest(Request.Get("http://localhost:9200/_nodes"));
assertThat(nodesResponse, containsString("\"heap_init_in_bytes\":536870912"));
assertThat(nodesResponse, containsString("\"using_compressed_ordinary_object_pointers\":\"false\""));

stopElasticsearch();
} finally {
rm(firstOptions);
rm(secondOptions);
}
}

public void test80RelativePathConf() throws Exception {

final Path temp = getTempDir().resolve("esconf-alternate");
Expand Down
Loading