Commit 772913e9 authored by Georgios Ouzounis's avatar Georgios Ouzounis

LAM-49 Corrected status command in Apache Flink and HDFS init scripts.

parent 082cb732
......@@ -16,6 +16,9 @@ START_COMMAND="$INSTALLATION_PATH/flink/bin/yarn-session.sh -n {{ number_of_task
# before Flink's deployment.
STOP_COMMAND="$HADOOP_HOME/bin/yarn application --kill"
# The command that will return the status of Apache Flink.
STATUS_COMMAND="$HADOOP_HOME/bin/yarn application -status"
start(){
nohup $START_COMMAND &
RETVAL=$?
......@@ -52,7 +55,8 @@ case "$1" in
[ -f $LOCKFILE ] && restart || :
;;
status)
ps -p $(cat $PIDFILE)
id=$($HADOOP_HOME/bin/yarn application --list | grep "Flink session" | cut -f1)
$STATUS_COMMAND $id
RETVAL=$?
;;
*)
......
......@@ -8,8 +8,13 @@ LOCKFILE="$INSTALLATION_PATH/hadoop/hdfs-lock"
# The command that will start Apache HDFS.
START_COMMAND="$INSTALLATION_PATH/hadoop/sbin/start-dfs.sh"
# The command that will stop Apache HDFS.
STOP_COMMAND="$INSTALLATION_PATH/hadoop/sbin/stop-dfs.sh"
# The command that will return the status of Apache HDFS.
STATUS_COMMAND="$INSTALLATION_PATH/hadoop/bin/hdfs dfsadmin -report"
start(){
nohup $START_COMMAND &
RETVAL=$?
......@@ -45,7 +50,7 @@ case "$1" in
[ -f $LOCKFILE ] && restart || :
;;
status)
ps -p $(cat $PIDFILE)
$STATUS_COMMAND
RETVAL=$?
;;
*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment