Pass ES_JAVA_OPTS to JVM for plugins script
This commit adds support for ES_JAVA_OPTS to the elasticsearch-plugin script. Relates #18140
This commit is contained in:
parent
34d90b041f
commit
4c6cf7ee88
|
@ -110,4 +110,4 @@ fi
|
|||
HOSTNAME=`hostname | cut -d. -f1`
|
||||
export HOSTNAME
|
||||
|
||||
eval "\"$JAVA\"" -client -Delasticsearch -Des.path.home="\"$ES_HOME\"" $properties -cp "\"$ES_HOME/lib/*\"" org.elasticsearch.plugins.PluginCli $args
|
||||
eval "\"$JAVA\"" "$ES_JAVA_OPTS" -client -Delasticsearch -Des.path.home="\"$ES_HOME\"" $properties -cp "\"$ES_HOME/lib/*\"" org.elasticsearch.plugins.PluginCli $args
|
||||
|
|
|
@ -48,7 +48,7 @@ GOTO loop
|
|||
|
||||
SET HOSTNAME=%COMPUTERNAME%
|
||||
|
||||
"%JAVA_HOME%\bin\java" -client -Des.path.home="%ES_HOME%" !properties! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args!
|
||||
"%JAVA_HOME%\bin\java" %ES_JAVA_OPTS% -client -Des.path.home="%ES_HOME%" !properties! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args!
|
||||
goto finally
|
||||
|
||||
|
||||
|
|
|
@ -476,3 +476,15 @@ fi
|
|||
# restore JAVA_HOME
|
||||
export JAVA_HOME=$java_home
|
||||
}
|
||||
|
||||
@test "[$GROUP] test ES_JAVA_OPTS" {
|
||||
# preserve ES_JAVA_OPTS
|
||||
local es_java_opts=$ES_JAVA_OPTS
|
||||
|
||||
export ES_JAVA_OPTS="-XX:+PrintFlagsFinal"
|
||||
# this will fail if ES_JAVA_OPTS is not passed through
|
||||
"$ESHOME/bin/elasticsearch-plugin" list | grep MaxHeapSize
|
||||
|
||||
# restore ES_JAVA_OPTS
|
||||
export ES_JAVA_OPTS=$es_java_opts
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue