diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn b/hadoop-yarn-project/hadoop-yarn/bin/yarn index 552cef41fae..d476cc605bc 100644 --- a/hadoop-yarn-project/hadoop-yarn/bin/yarn +++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn @@ -71,6 +71,7 @@ function print_usage(){ echo " nodemanager run a nodemanager on each slave" echo " timelineserver run the timeline server" echo " rmadmin admin tools" + echo " router run the Router daemon" echo " sharedcachemanager run the SharedCacheManager daemon" echo " scmadmin SharedCacheManager admin tools" echo " version print the version" @@ -177,6 +178,9 @@ fi if [ -d "$HADOOP_YARN_HOME/build/tools" ]; then CLASSPATH=${CLASSPATH}:$HADOOP_YARN_HOME/build/tools fi +if [ -d "$HADOOP_YARN_HOME/yarn-server/yarn-server-router/target/classes" ]; then + CLASSPATH=${CLASSPATH}:$HADOOP_YARN_HOME/yarn-server/yarn-server-router/target/classes +fi CLASSPATH=${CLASSPATH}:$HADOOP_YARN_HOME/${YARN_DIR}/* CLASSPATH=${CLASSPATH}:$HADOOP_YARN_HOME/${YARN_LIB_JARS_DIR}/* @@ -220,6 +224,10 @@ if [ "$COMMAND" = "classpath" ] ; then elif [ "$COMMAND" = "rmadmin" ] ; then CLASS='org.apache.hadoop.yarn.client.cli.RMAdminCLI' YARN_OPTS="$YARN_OPTS $YARN_CLIENT_OPTS" +elif [ "$COMMAND" = "router" ] ; then + CLASSPATH=${CLASSPATH}:$YARN_CONF_DIR/rt-config/log4j.properties + CLASS='org.apache.hadoop.yarn.server.router.Router' + YARN_OPTS="$YARN_OPTS $YARN_ROUTER_OPTS" elif [ "$COMMAND" = "scmadmin" ] ; then CLASS='org.apache.hadoop.yarn.client.SCMAdmin' YARN_OPTS="$YARN_OPTS $YARN_CLIENT_OPTS" diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn.cmd b/hadoop-yarn-project/hadoop-yarn/bin/yarn.cmd index 3cd57a745b0..230e88c5a26 100644 --- a/hadoop-yarn-project/hadoop-yarn/bin/yarn.cmd +++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn.cmd @@ -138,6 +138,10 @@ if "%1" == "--loglevel" ( set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\build\tools ) + if exist %HADOOP_YARN_HOME%\yarn-server\yarn-server-router\target\classes ( + set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-server\yarn-server-router\target\classes + ) + set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\%YARN_DIR%\* set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\%YARN_LIB_JARS_DIR%\* @@ -151,7 +155,7 @@ if "%1" == "--loglevel" ( set yarncommands=resourcemanager nodemanager proxyserver rmadmin version jar ^ application applicationattempt cluster container node queue logs daemonlog historyserver ^ - timelineserver classpath + timelineserver router classpath for %%i in ( %yarncommands% ) do ( if %yarn-command% == %%i set yarncommand=true ) @@ -242,6 +246,12 @@ goto :eof ) goto :eof +:router + set CLASSPATH=%CLASSPATH%;%YARN_CONF_DIR%\router-config\log4j.properties + set CLASS=org.apache.hadoop.yarn.server.router.Router + set YARN_OPTS=%YARN_OPTS% %HADOOP_ROUTER_OPTS% + goto :eof + :nodemanager set CLASSPATH=%CLASSPATH%;%YARN_CONF_DIR%\nm-config\log4j.properties set CLASS=org.apache.hadoop.yarn.server.nodemanager.NodeManager @@ -311,6 +321,7 @@ goto :eof @echo where COMMAND is one of: @echo resourcemanager run the ResourceManager @echo nodemanager run a nodemanager on each slave + @echo router run the Router daemon @echo timelineserver run the timeline server @echo rmadmin admin tools @echo version print the version diff --git a/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh b/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh index 2fc693b4903..5aeeda3bf5d 100644 --- a/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh +++ b/hadoop-yarn-project/hadoop-yarn/conf/yarn-env.sh @@ -118,4 +118,14 @@ if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then fi YARN_OPTS="$YARN_OPTS -Dyarn.policy.file=$YARN_POLICYFILE" +### +# Router specific parameters +### +# Specify the JVM options to be used when starting the Router. +# 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_ROUTER_OPTS=