YARN-11570. Add YARN_GLOBALPOLICYGENERATOR_HEAPSIZE to yarn-env for GPG. (#6086)

This commit is contained in:
slfan1989 2023-09-21 08:11:59 +08:00 committed by GitHub
parent d273c13ab5
commit 42b8e6faa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -110,6 +110,10 @@ ${HADOOP_COMMON_HOME}/${HADOOP_COMMON_LIB_JARS_DIR}"
globalpolicygenerator)
HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
HADOOP_CLASSNAME='org.apache.hadoop.yarn.server.globalpolicygenerator.GlobalPolicyGenerator'
# Backwards compatibility
if [[ -n "${YARN_GLOBALPOLICYGENERATOR_HEAPSIZE}" ]]; then
HADOOP_HEAPSIZE_MAX="${YARN_GLOBALPOLICYGENERATOR_HEAPSIZE}"
fi
;;
jar)
HADOOP_CLASSNAME=org.apache.hadoop.util.RunJar

View File

@ -273,6 +273,9 @@ goto :eof
set CLASSPATH=%CLASSPATH%;%YARN_CONF_DIR%\globalpolicygenerator-config\log4j.properties
set CLASS=org.apache.hadoop.yarn.server.globalpolicygenerator.GlobalPolicyGenerator
set YARN_OPTS=%YARN_OPTS% %YARN_GLOBALPOLICYGENERATOR_OPTS%
if defined YARN_GLOBALPOLICYGENERATOR_HEAPSIZE (
set JAVA_HEAP_MAX=-Xmx%YARN_GLOBALPOLICYGENERATOR_HEAPSIZE%m
)
goto :eof
:routeradmin

View File

@ -164,6 +164,11 @@
# Global Policy Generator specific parameters
###
# Specify the max heapsize for the Global Policy Generator. If no units are
# given, it will be assumed to be in MB.
# Default is the same as HADOOP_HEAPSIZE_MAX
#export YARN_GLOBALPOLICYGENERATOR_HEAPSIZE=
# Specify the JVM options to be used when starting the GPG.
# These options will be appended to the options specified as HADOOP_OPTS
# and therefore may override any similar flags set in HADOOP_OPTS