Skip to content

Commit

Permalink
YARN-11570. Add YARN_GLOBALPOLICYGENERATOR_HEAPSIZE to yarn-env for G…
Browse files Browse the repository at this point in the history
…PG. (#6086)
  • Loading branch information
slfan1989 authored Sep 21, 2023
1 parent d273c13 commit 42b8e6f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hadoop-yarn-project/hadoop-yarn/bin/yarn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions hadoop-yarn-project/hadoop-yarn/bin/yarn.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42b8e6f

Please sign in to comment.