From c2a02fb91745cf91560ae5d384d7286f951696b0 Mon Sep 17 00:00:00 2001 From: Hitesh Shah Date: Fri, 19 Jul 2013 19:24:13 +0000 Subject: [PATCH] merge -c 1504970 from trunk to branch-2 to fix YARN-919. Document setting default heap sizes in yarn env.sh Contributed by Mayank Bansal. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1504971 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 ++ .../hadoop-yarn/conf/yarn-env.sh | 38 ++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index a45c8c230b5..f52872eb3c3 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -681,6 +681,9 @@ Release 2.1.0-beta - 2013-07-02 YARN-654. AMRMClient: Perform sanity checks for parameters of public methods (Xuan Gong via bikas)" + YARN-919. Document setting default heap sizes in yarn-env.sh (Mayank + Bansal via hitesh) + BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS YARN-158. Yarn creating package-info.java must not depend on sh. diff --git a/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh b/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh index 1e56247e6fb..cfce28d26b2 100644 --- a/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh +++ b/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh @@ -34,13 +34,47 @@ fi JAVA=$JAVA_HOME/bin/java JAVA_HEAP_MAX=-Xmx1000m +# For setting YARN specific HEAP sizes please use this +# Parameter and set appropriately +# YARN_HEAPSIZE=1000 + # check envvars which might override default args if [ "$YARN_HEAPSIZE" != "" ]; then - #echo "run with heapsize $YARN_HEAPSIZE" JAVA_HEAP_MAX="-Xmx""$YARN_HEAPSIZE""m" - #echo $JAVA_HEAP_MAX fi +# Resource Manager specific parameters + +# Specify the max Heapsize for the ResourceManager using a numerical value +# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set +# the value to 1000. +# This value will be overridden by an Xmx setting specified in either YARN_OPTS +# and/or YARN_RESOURCEMANAGER_OPTS. +# If not specified, the default value will be picked from either YARN_HEAPMAX +# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. +#export YARN_RESOURCEMANAGER_HEAPSIZE=1000 + +# Specify the JVM options to be used when starting the ResourceManager. +# These options will be appended to the options specified as YARN_OPTS +# and therefore may override any similar flags set in YARN_OPTS +#export YARN_RESOURCEMANAGER_OPTS= + +# Node Manager specific parameters + +# Specify the max Heapsize for the NodeManager using a numerical value +# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set +# the value to 1000. +# This value will be overridden by an Xmx setting specified in either YARN_OPTS +# and/or YARN_NODEMANAGER_OPTS. +# If not specified, the default value will be picked from either YARN_HEAPMAX +# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. +#export YARN_NODEMANAGER_HEAPSIZE=1000 + +# Specify the JVM options to be used when starting the NodeManager. +# These options will be appended to the options specified as YARN_OPTS +# and therefore may override any similar flags set in YARN_OPTS +#export YARN_NODEMANAGER_OPTS= + # so that filenames w/ spaces are handled correctly in loops below IFS=