Commit 4036ac66 authored by Georgios Ouzounis's avatar Georgios Ouzounis
Browse files

LAM-49 Changed Apache HDFS and Yarn init scripts to use the default stop...

LAM-49 Changed Apache HDFS and Yarn init scripts to use the default stop script to stop the service.
parent 1e28080f
......@@ -12,6 +12,9 @@ LOCKFILE="$INSTALLATION_PATH/flink/flink-lock"
# The command that will start Apache Flink.
START_COMMAND="$INSTALLATION_PATH/flink/bin/yarn-session.sh -n {{ number_of_taskmanagers }} -tm {{ ram_per_task_manager }}"
# The stop function, will not stop Apache Flink. The best way to stop Apache Flink running on an Apache Yarn session, is to
# stop the Apache Yarn session itself.
start(){
touch $PIDFILE
nohup $START_COMMAND & echo $! > $PIDFILE
......
......@@ -3,25 +3,22 @@
# The path where Apache Hadoop is installed.
INSTALLATION_PATH="{{ installation_path }}"
# The full path of the pid file to use.
PIDFILE="$INSTALLATION_PATH/hadoop/hdfs.pid"
# The full path of the lock file to use.
LOCKFILE="$INSTALLATION_PATH/hadoop/hdfs-lock"
# The command that will start Apache HDFS.
START_COMMAND="$INSTALLATION_PATH/hadoop/sbin/start-dfs.sh"
STOP_COMMAND="$INSTALLATION_PATH/hadoop/sbin/stop-dfs.sh"
start(){
touch $PIDFILE
nohup $START_COMMAND & echo $! > $PIDFILE
nohup $START_COMMAND &
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCKFILE
return $RETVAL
}
stop(){
kill -s 9 $(cat $PIDFILE)
nohup $STOP_COMMAND &
RETVAL=$?
[ $RETVAL -eq 0 ] && $(rm -f $LOCKFILE)
return $RETVAL
......
......@@ -3,25 +3,22 @@
# The path where Apache Hadoop is installed.
INSTALLATION_PATH="{{ installation_path }}"
# The full path of the pid file to use.
PIDFILE="$INSTALLATION_PATH/hadoop/yarn.pid"
# The full path of the lock file to use.
LOCKFILE="$INSTALLATION_PATH/hadoop/yarn-lock"
# The command that will start Apache Yarn.
START_COMMAND="$INSTALLATION_PATH/hadoop/sbin/start-yarn.sh"
STOP_COMMAND="$INSTALLATION_PATH/hadoop/sbin/stop-yarn.sh"
start(){
touch $PIDFILE
nohup $START_COMMAND & echo $! > $PIDFILE
nohup $START_COMMAND &
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCKFILE
return $RETVAL
}
stop(){
kill -s 9 $(cat $PIDFILE)
nohup $STOP_COMMAND &
RETVAL=$?
[ $RETVAL -eq 0 ] && $(rm -f $LOCKFILE)
return $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