From d7d9006afc60dd17884d939921a67d4d19f87f4f Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Tue, 13 Dec 2016 13:08:54 -0800 Subject: [PATCH] HADOOP-13898. Should set HADOOP_JOB_HISTORYSERVER_HEAPSIZE only if it's empty. Contributed by Fei Hui. --- hadoop-mapreduce-project/conf/mapred-env.cmd | 5 ++++- hadoop-mapreduce-project/conf/mapred-env.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/conf/mapred-env.cmd b/hadoop-mapreduce-project/conf/mapred-env.cmd index f27943f44a2..b50ff123fe6 100644 --- a/hadoop-mapreduce-project/conf/mapred-env.cmd +++ b/hadoop-mapreduce-project/conf/mapred-env.cmd @@ -14,7 +14,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. -set HADOOP_JOB_HISTORYSERVER_HEAPSIZE=1000 +@rem when HADOOP_JOB_HISTORYSERVER_HEAPSIZE is not defined, set it +if not defined HADOOP_JOB_HISTORYSERVER_HEAPSIZE ( + set HADOOP_JOB_HISTORYSERVER_HEAPSIZE=1000 +) set HADOOP_MAPRED_ROOT_LOGGER=%HADOOP_LOGLEVEL%,RFA diff --git a/hadoop-mapreduce-project/conf/mapred-env.sh b/hadoop-mapreduce-project/conf/mapred-env.sh index 6be1e279667..359088211df 100644 --- a/hadoop-mapreduce-project/conf/mapred-env.sh +++ b/hadoop-mapreduce-project/conf/mapred-env.sh @@ -15,7 +15,10 @@ # export JAVA_HOME=/home/y/libexec/jdk1.6.0/ -export HADOOP_JOB_HISTORYSERVER_HEAPSIZE=1000 +# when HADOOP_JOB_HISTORYSERVER_HEAPSIZE is not defined, set it. +if [ "$HADOOP_JOB_HISTORYSERVER_HEAPSIZE" = "" ];then + export HADOOP_JOB_HISTORYSERVER_HEAPSIZE=1000 +fi export HADOOP_MAPRED_ROOT_LOGGER=INFO,RFA