HBASE-19784 bin/stop-hbase more friendly when hbase already stopped
Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
eeb40ff66c
commit
b1729a298b
|
@ -44,6 +44,7 @@ logout=$HBASE_LOG_DIR/$HBASE_LOG_PREFIX.out
|
||||||
loglog="${HBASE_LOG_DIR}/${HBASE_LOGFILE}"
|
loglog="${HBASE_LOG_DIR}/${HBASE_LOGFILE}"
|
||||||
pid=${HBASE_PID_DIR:-/tmp}/hbase-$HBASE_IDENT_STRING-master.pid
|
pid=${HBASE_PID_DIR:-/tmp}/hbase-$HBASE_IDENT_STRING-master.pid
|
||||||
|
|
||||||
|
if [[ -e $pid ]]; then
|
||||||
echo -n stopping hbase
|
echo -n stopping hbase
|
||||||
echo "`date` Stopping hbase (via master)" >> $loglog
|
echo "`date` Stopping hbase (via master)" >> $loglog
|
||||||
|
|
||||||
|
@ -54,7 +55,9 @@ nohup nice -n ${HBASE_NICENESS:-0} "$HBASE_HOME"/bin/hbase \
|
||||||
waitForProcessEnd `cat $pid` 'stop-master-command'
|
waitForProcessEnd `cat $pid` 'stop-master-command'
|
||||||
|
|
||||||
rm -f $pid
|
rm -f $pid
|
||||||
|
else
|
||||||
|
echo no hbase master found
|
||||||
|
fi
|
||||||
|
|
||||||
# distributed == false means that the HMaster will kill ZK when it exits
|
# distributed == false means that the HMaster will kill ZK when it exits
|
||||||
# HBASE-6504 - only take the first line of the output in case verbose gc is on
|
# HBASE-6504 - only take the first line of the output in case verbose gc is on
|
||||||
|
|
Loading…
Reference in New Issue