aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2016-04-27 14:52:41 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2016-04-27 14:52:41 +0000
commitcc6b239238b4baf23861416c6a9b60930110e76a (patch)
treeedf19bf110fd405d18ff78644402bb76768b9524
parent500e6e321436b4e91a866205c87f6418045eb510 (diff)
downloadports-cc6b239238b4baf23861416c6a9b60930110e76a.tar.gz
ports-cc6b239238b4baf23861416c6a9b60930110e76a.zip
Notes
-rw-r--r--devel/hadoop2/files/datanode.in6
-rw-r--r--devel/hadoop2/files/journalnode.in6
-rw-r--r--devel/hadoop2/files/namenode.in6
-rw-r--r--devel/hadoop2/files/nodemanager.in6
-rw-r--r--devel/hadoop2/files/resourcemanager.in7
-rw-r--r--devel/hadoop2/files/zkfc.in6
6 files changed, 37 insertions, 0 deletions
diff --git a/devel/hadoop2/files/datanode.in b/devel/hadoop2/files/datanode.in
index 8c48752f1f3b..4eb7fc7a1958 100644
--- a/devel/hadoop2/files/datanode.in
+++ b/devel/hadoop2/files/datanode.in
@@ -22,10 +22,12 @@ load_rc_config "${name}"
: ${datanode_user:=%%HDFS_USER%%}
command="%%PREFIX%%/sbin/hadoop-daemon.sh"
+command_interpreter_execution="%%JAVA_HOME%%/bin/java"
command_args='--config %%ETCDIR%% start datanode'
start_postcmd="start_postcmd"
stop_cmd=datanode_stop
+status_precmd=find_pid
start_postcmd () {
rc_pid=$(check_pidfile ${pidfile} %%JAVA_HOME%%/bin/java)
@@ -38,4 +40,8 @@ datanode_stop () {
su -m ${datanode_user} -c "${command} --config %%ETCDIR%% stop datanode"
}
+find_pid () {
+ rc_pid=$(check_pidfile $pidfile $command_interpreter_execution)
+}
+
run_rc_command "$1"
diff --git a/devel/hadoop2/files/journalnode.in b/devel/hadoop2/files/journalnode.in
index 9621a9ced3ba..0bce6a42db4d 100644
--- a/devel/hadoop2/files/journalnode.in
+++ b/devel/hadoop2/files/journalnode.in
@@ -21,12 +21,18 @@ load_rc_config "${name}"
: ${journalnode_user:=%%HDFS_USER%%}
command="%%PREFIX%%/sbin/hadoop-daemon.sh"
+command_interpreter_execution="%%JAVA_HOME%%/bin/java"
command_args='--config %%ETCDIR%% start journalnode'
stop_cmd=journalnode_stop
+status_precmd=find_pid
journalnode_stop () {
su -m ${journalnode_user} -c "${command} --config %%ETCDIR%% stop journalnode"
}
+find_pid () {
+ rc_pid=$(check_pidfile $pidfile $command_interpreter_execution)
+}
+
run_rc_command "$1"
diff --git a/devel/hadoop2/files/namenode.in b/devel/hadoop2/files/namenode.in
index 28e71fec2e37..65f061f887ad 100644
--- a/devel/hadoop2/files/namenode.in
+++ b/devel/hadoop2/files/namenode.in
@@ -21,12 +21,18 @@ load_rc_config "${name}"
: ${namenode_user:=%%HDFS_USER%%}
command="%%PREFIX%%/sbin/hadoop-daemon.sh"
+command_interpreter_execution="%%JAVA_HOME%%/bin/java"
command_args='--config %%ETCDIR%% start namenode'
stop_cmd=namenode_stop
+status_precmd=find_pid
namenode_stop () {
su -m ${namenode_user} -c "${command} --config %%ETCDIR%% stop namenode"
}
+find_pid () {
+ rc_pid=$(check_pidfile $pidfile $command_interpreter_execution)
+}
+
run_rc_command "$1"
diff --git a/devel/hadoop2/files/nodemanager.in b/devel/hadoop2/files/nodemanager.in
index ee1252ec27ea..70a4161c04cb 100644
--- a/devel/hadoop2/files/nodemanager.in
+++ b/devel/hadoop2/files/nodemanager.in
@@ -22,10 +22,12 @@ load_rc_config "${name}"
: ${nodemanager_user:=%%MAPRED_USER%%}
command="%%PREFIX%%/sbin/yarn-daemon.sh"
+command_interpreter_execution="%%JAVA_HOME%%/bin/java"
command_args='--config %%ETCDIR%% start nodemanager'
start_postcmd="start_postcmd"
stop_cmd=nodemanager_stop
+status_precmd=find_pid
start_postcmd () {
rc_pid=$(check_pidfile ${pidfile} %%JAVA_HOME%%/bin/java)
@@ -38,4 +40,8 @@ nodemanager_stop () {
su -m ${nodemanager_user} -c "${command} --config %%ETCDIR%% stop nodemanager"
}
+find_pid () {
+ rc_pid=$(check_pidfile $pidfile $command_interpreter_execution)
+}
+
run_rc_command "$1"
diff --git a/devel/hadoop2/files/resourcemanager.in b/devel/hadoop2/files/resourcemanager.in
index af229a7b18f5..ae53380b7a33 100644
--- a/devel/hadoop2/files/resourcemanager.in
+++ b/devel/hadoop2/files/resourcemanager.in
@@ -21,12 +21,19 @@ load_rc_config "${name}"
: ${resourcemanager_user:=%%MAPRED_USER%%}
command="%%PREFIX%%/sbin/yarn-daemon.sh"
+command_interpreter_execution="%%JAVA_HOME%%/bin/java"
command_args='--config %%ETCDIR%% start resourcemanager'
stop_cmd=resourcemanager_stop
+start_postcmd="start_postcmd"
+status_precmd=find_pid
resourcemanager_stop () {
su -m ${resourcemanager_user} -c "${command} --config %%ETCDIR%% stop resourcemanager"
}
+find_pid () {
+ rc_pid=$(check_pidfile $pidfile $command_interpreter_execution)
+}
+
run_rc_command "$1"
diff --git a/devel/hadoop2/files/zkfc.in b/devel/hadoop2/files/zkfc.in
index 674722fa2650..ee7e76821e90 100644
--- a/devel/hadoop2/files/zkfc.in
+++ b/devel/hadoop2/files/zkfc.in
@@ -21,12 +21,18 @@ load_rc_config "${name}"
: ${zkfc_user:=%%HDFS_USER%%}
command="%%PREFIX%%/sbin/hadoop-daemon.sh"
+command_interpreter_execution="%%JAVA_HOME%%/bin/java"
command_args='--config %%ETCDIR%% start zkfc'
stop_cmd=zkfc_stop
+status_precmd=find_pid
zkfc_stop () {
su -m ${zkfc_user} -c "${command} --config %%ETCDIR%% stop zkfc"
}
+find_pid () {
+ rc_pid=$(check_pidfile $pidfile $command_interpreter_execution)
+}
+
run_rc_command "$1"