Date: Fri, 4 Jul 2014 19:32:07 +0000 (UTC) From: Dmitry Sivachenko <demon@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r360650 - head/devel/hadoop2/files Message-ID: <201407041932.s64JW7K2034346@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: demon Date: Fri Jul 4 19:32:06 2014 New Revision: 360650 URL: http://svnweb.freebsd.org/changeset/ports/360650 QAT: https://qat.redports.org/buildarchive/r360650/ Log: Add two missing startup scripts; fix path in all rc-scripts. Added: head/devel/hadoop2/files/historyserver.in (contents, props changed) head/devel/hadoop2/files/patch-hadoop-mapreduce-project-bin-mr-jobhistory-daemon.sh (contents, props changed) head/devel/hadoop2/files/webappproxyserver.in (contents, props changed) Modified: head/devel/hadoop2/files/datanode.in head/devel/hadoop2/files/namenode.in head/devel/hadoop2/files/nodemanager.in head/devel/hadoop2/files/resourcemanager.in head/devel/hadoop2/files/secondarynamenode.in Modified: head/devel/hadoop2/files/datanode.in ============================================================================== --- head/devel/hadoop2/files/datanode.in Fri Jul 4 19:10:42 2014 (r360649) +++ head/devel/hadoop2/files/datanode.in Fri Jul 4 19:32:06 2014 (r360650) @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start stop_cmd=datanode_stop datanode_stop () { - su -m ${datanode_user} -c "${command} --config ${HADOOP_CONF_DIR} stop datanode" + su -m ${datanode_user} -c "${command} --config %%ETCDIR%% stop datanode" } run_rc_command "$1" Added: head/devel/hadoop2/files/historyserver.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hadoop2/files/historyserver.in Fri Jul 4 19:32:06 2014 (r360650) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: historyserver +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# historyserver_enable (bool): Set to NO by default. +# Set it to YES to enable resourcemanager. + +. /etc/rc.subr + +name=historyserver +rcvar=historyserver_enable + +load_rc_config "${name}" + +: ${historyserver_enable:=NO} +: ${historyserver_user:=%%MAPRED_USER%%} + +command="%%PREFIX%%/sbin/mr-jobhistory-daemon.sh" +command_args='--config %%ETCDIR%% start historyserver' + +stop_cmd=historyserver_stop + +historyserver_stop () { + su -m ${historyserver_user} -c "${command} --config %%ETCDIR%% stop historyserver" +} + +run_rc_command "$1" Modified: head/devel/hadoop2/files/namenode.in ============================================================================== --- head/devel/hadoop2/files/namenode.in Fri Jul 4 19:10:42 2014 (r360649) +++ head/devel/hadoop2/files/namenode.in Fri Jul 4 19:32:06 2014 (r360650) @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start stop_cmd=namenode_stop namenode_stop () { - su -m ${namenode_user} -c "${command} --config ${HADOOP_CONF_DIR} stop namenode" + su -m ${namenode_user} -c "${command} --config %%ETCDIR%% stop namenode" } run_rc_command "$1" Modified: head/devel/hadoop2/files/nodemanager.in ============================================================================== --- head/devel/hadoop2/files/nodemanager.in Fri Jul 4 19:10:42 2014 (r360649) +++ head/devel/hadoop2/files/nodemanager.in Fri Jul 4 19:32:06 2014 (r360650) @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start stop_cmd=nodemanager_stop nodemanager_stop () { - su -m ${nodemanager_user} -c "${command} --config ${HADOOP_CONF_DIR} stop nodemanager" + su -m ${nodemanager_user} -c "${command} --config %%ETCDIR%% stop nodemanager" } run_rc_command "$1" Added: head/devel/hadoop2/files/patch-hadoop-mapreduce-project-bin-mr-jobhistory-daemon.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hadoop2/files/patch-hadoop-mapreduce-project-bin-mr-jobhistory-daemon.sh Fri Jul 4 19:32:06 2014 (r360650) @@ -0,0 +1,21 @@ +--- hadoop-mapreduce-project/bin/mr-jobhistory-daemon.sh.orig 2014-06-21 09:40:38.000000000 +0400 ++++ hadoop-mapreduce-project/bin/mr-jobhistory-daemon.sh 2014-07-04 23:15:55.000000000 +0400 +@@ -78,9 +78,6 @@ + . "${HADOOP_CONF_DIR}/mapred-env.sh" + fi + +-mkdir -p "$HADOOP_MAPRED_LOG_DIR" +-chown $HADOOP_MAPRED_IDENT_STRING $HADOOP_MAPRED_LOG_DIR +- + if [ "$HADOOP_MAPRED_PID_DIR" = "" ]; then + HADOOP_MAPRED_PID_DIR=/tmp + fi +@@ -101,8 +98,6 @@ + + (start) + +- mkdir -p "$HADOOP_MAPRED_PID_DIR" +- + if [ -f $pid ]; then + if kill -0 `cat $pid` > /dev/null 2>&1; then + echo $command running as process `cat $pid`. Stop it first. Modified: head/devel/hadoop2/files/resourcemanager.in ============================================================================== --- head/devel/hadoop2/files/resourcemanager.in Fri Jul 4 19:10:42 2014 (r360649) +++ head/devel/hadoop2/files/resourcemanager.in Fri Jul 4 19:32:06 2014 (r360650) @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start stop_cmd=resourcemanager_stop resourcemanager_stop () { - su -m ${resourcemanager_user} -c "${command} --config ${HADOOP_CONF_DIR} stop resourcemanager" + su -m ${resourcemanager_user} -c "${command} --config %%ETCDIR%% stop resourcemanager" } run_rc_command "$1" Modified: head/devel/hadoop2/files/secondarynamenode.in ============================================================================== --- head/devel/hadoop2/files/secondarynamenode.in Fri Jul 4 19:10:42 2014 (r360649) +++ head/devel/hadoop2/files/secondarynamenode.in Fri Jul 4 19:32:06 2014 (r360650) @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start stop_cmd=secondarynamenode_stop secondarynamenode_stop () { - su -m ${secondarynamenode_user} -c "${command} --config ${HADOOP_CONF_DIR} stop secondarynamenode" + su -m ${secondarynamenode_user} -c "${command} --config %%ETCDIR%% stop secondarynamenode" } run_rc_command "$1" Added: head/devel/hadoop2/files/webappproxyserver.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/hadoop2/files/webappproxyserver.in Fri Jul 4 19:32:06 2014 (r360650) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: webappproxyserver +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# webappproxyserver_enable (bool): Set to NO by default. +# Set it to YES to enable webappproxyserver. + +. /etc/rc.subr + +name=webappproxyserver +rcvar=webappproxyserver_enable + +load_rc_config "${name}" + +: ${webappproxyserver_enable:=NO} +: ${webappproxyserver_user:=%%MAPRED_USER%%} + +command="%%PREFIX%%/sbin/yarn-daemon.sh" +command_args='--config %%ETCDIR%% start proxyserver' + +stop_cmd=webappproxyserver_stop + +webappproxyserver_stop () { + su -m ${webappproxyserver_user} -c "${command} --config %%ETCDIR%% stop proxyserver" +} + +run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407041932.s64JW7K2034346>