diff options
author | demon <demon@FreeBSD.org> | 2014-07-05 03:32:06 +0800 |
---|---|---|
committer | demon <demon@FreeBSD.org> | 2014-07-05 03:32:06 +0800 |
commit | 2ebc17b955ba0266589791d23cbfec2d3aae2cd7 (patch) | |
tree | 1eb540c83fb31d61f90f2c914fd6f98d279eab39 /devel/hadoop2 | |
parent | 517ab77b424da463cebe260f503d29aa3c33438d (diff) | |
download | freebsd-ports-gnome-2ebc17b955ba0266589791d23cbfec2d3aae2cd7.tar.gz freebsd-ports-gnome-2ebc17b955ba0266589791d23cbfec2d3aae2cd7.tar.zst freebsd-ports-gnome-2ebc17b955ba0266589791d23cbfec2d3aae2cd7.zip |
Add two missing startup scripts;
fix path in all rc-scripts.
Diffstat (limited to 'devel/hadoop2')
-rw-r--r-- | devel/hadoop2/files/datanode.in | 2 | ||||
-rw-r--r-- | devel/hadoop2/files/historyserver.in | 31 | ||||
-rw-r--r-- | devel/hadoop2/files/namenode.in | 2 | ||||
-rw-r--r-- | devel/hadoop2/files/nodemanager.in | 2 | ||||
-rw-r--r-- | devel/hadoop2/files/patch-hadoop-mapreduce-project-bin-mr-jobhistory-daemon.sh | 21 | ||||
-rw-r--r-- | devel/hadoop2/files/resourcemanager.in | 2 | ||||
-rw-r--r-- | devel/hadoop2/files/secondarynamenode.in | 2 | ||||
-rw-r--r-- | devel/hadoop2/files/webappproxyserver.in | 31 |
8 files changed, 88 insertions, 5 deletions
diff --git a/devel/hadoop2/files/datanode.in b/devel/hadoop2/files/datanode.in index 14225a8bf58c..2a9bfda51e8b 100644 --- a/devel/hadoop2/files/datanode.in +++ b/devel/hadoop2/files/datanode.in @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start datanode' 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" diff --git a/devel/hadoop2/files/historyserver.in b/devel/hadoop2/files/historyserver.in new file mode 100644 index 000000000000..0af9e3115cfd --- /dev/null +++ b/devel/hadoop2/files/historyserver.in @@ -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" diff --git a/devel/hadoop2/files/namenode.in b/devel/hadoop2/files/namenode.in index 608bd5bdf74e..2d12574b6a53 100644 --- a/devel/hadoop2/files/namenode.in +++ b/devel/hadoop2/files/namenode.in @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start namenode' 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" diff --git a/devel/hadoop2/files/nodemanager.in b/devel/hadoop2/files/nodemanager.in index 91108bf9df12..c01cf1379f40 100644 --- a/devel/hadoop2/files/nodemanager.in +++ b/devel/hadoop2/files/nodemanager.in @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start nodemanager' 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" diff --git a/devel/hadoop2/files/patch-hadoop-mapreduce-project-bin-mr-jobhistory-daemon.sh b/devel/hadoop2/files/patch-hadoop-mapreduce-project-bin-mr-jobhistory-daemon.sh new file mode 100644 index 000000000000..bf1ed73e1910 --- /dev/null +++ b/devel/hadoop2/files/patch-hadoop-mapreduce-project-bin-mr-jobhistory-daemon.sh @@ -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. diff --git a/devel/hadoop2/files/resourcemanager.in b/devel/hadoop2/files/resourcemanager.in index 2937e67da21b..4481a8c4f87d 100644 --- a/devel/hadoop2/files/resourcemanager.in +++ b/devel/hadoop2/files/resourcemanager.in @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start resourcemanager' 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" diff --git a/devel/hadoop2/files/secondarynamenode.in b/devel/hadoop2/files/secondarynamenode.in index 4929ffb4f02f..ead13f55d2e1 100644 --- a/devel/hadoop2/files/secondarynamenode.in +++ b/devel/hadoop2/files/secondarynamenode.in @@ -25,7 +25,7 @@ command_args='--config %%ETCDIR%% start secondarynamenode' 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" diff --git a/devel/hadoop2/files/webappproxyserver.in b/devel/hadoop2/files/webappproxyserver.in new file mode 100644 index 000000000000..7fea7b32a02c --- /dev/null +++ b/devel/hadoop2/files/webappproxyserver.in @@ -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" |