HBASE-7838 HBase regionserver never stoping when running (Damien Hardy)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1446116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
164b3a4959
commit
67ba5e3d50
|
@ -235,6 +235,7 @@ case $startStop in
|
|||
rm -f "$HBASE_START_FILE"
|
||||
if [ -f $pid ]; then
|
||||
pidToKill=`cat $pid`
|
||||
processedAt=`date +%s`
|
||||
# kill -0 == see if the PID exists
|
||||
if kill -0 $pidToKill > /dev/null 2>&1; then
|
||||
echo -n stopping $command
|
||||
|
@ -244,7 +245,16 @@ case $startStop in
|
|||
do
|
||||
echo -n "."
|
||||
sleep 1;
|
||||
# if process persists more than $HBASE_STOP_TIMEOUT (default 1200 sec) no mercy
|
||||
if [ $(( `date +%s` - $processedAt )) -gt ${HBASE_STOP_TIMEOUT:-1200} ]; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
# process still there : kill kill
|
||||
if kill -0 $pidToKill > /dev/null 2>&1; then
|
||||
echo -n force stopping $command
|
||||
kill -9 $pidToKill > /dev/null 2>&1
|
||||
fi
|
||||
rm $pid
|
||||
echo
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue