Browse Source

YARN-5431. TimelineReader daemon start should allow to pass its own reader opts (Rohith Sharma K S via Varun Saxena)

Varun Saxena 8 years ago
parent
commit
8d06bda337

+ 2 - 0
hadoop-yarn-project/hadoop-yarn/bin/yarn

@@ -175,6 +175,8 @@ function yarncmd_case
     timelinereader)
       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
       HADOOP_CLASSNAME='org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderServer'
+      hadoop_debug "Append YARN_TIMELINEREADER_OPTS onto HADOOP_OPTS"
+      HADOOP_OPTS="${HADOOP_OPTS} ${YARN_TIMELINEREADER_OPTS}"
     ;;
     timelineserver)
       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"

+ 1 - 0
hadoop-yarn-project/hadoop-yarn/bin/yarn.cmd

@@ -245,6 +245,7 @@ goto :eof
 :timelinereader
   set CLASSPATH=%CLASSPATH%;%YARN_CONF_DIR%\timelineserver-config\log4j.properties
   set CLASS=org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderServer
+  set YARN_OPTS=%YARN_OPTS% %YARN_TIMELINEREADER_OPTS%
   goto :eof
 
 :nodemanager

+ 13 - 1
hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh

@@ -76,7 +76,7 @@
 #export YARN_NODEMANAGER_OPTS=
 
 ###
-# TimeLineServer specifc parameters
+# TimeLineServer specific parameters
 ###
 
 # Specify the max heapsize for the timelineserver.  If no units are
@@ -94,6 +94,18 @@
 #
 #export YARN_TIMELINESERVER_OPTS=
 
+###
+# TimeLineReader specific parameters
+###
+
+# Specify the JVM options to be used when starting the TimeLineReader.
+# These options will be appended to the options specified as HADOOP_OPTS
+# and therefore may override any similar flags set in HADOOP_OPTS
+#
+# See ResourceManager for some examples
+#
+#export YARN_TIMELINEREADER_OPTS=
+
 ###
 # Web App Proxy Server specifc parameters
 ###