diff --git a/bin/graceful_stop.sh b/bin/graceful_stop.sh index fc18239830b2..da3495b1d7bf 100755 --- a/bin/graceful_stop.sh +++ b/bin/graceful_stop.sh @@ -115,7 +115,7 @@ if [ "$nob" == "true" ]; then HBASE_BALANCER_STATE=false else log "Disabling load balancer" - HBASE_BALANCER_STATE=$(echo 'balance_switch false' | "$bin"/hbase --config "${HBASE_CONF_DIR}" shell -n | tail -1) + HBASE_BALANCER_STATE=$(echo 'balance_switch false' | "$bin"/hbase --config "${HBASE_CONF_DIR}" shell -n | grep 'Previous balancer state' | awk -F": " '{print $2}') log "Previous balancer state was $HBASE_BALANCER_STATE" fi