From c89c95a2458d5bbd3702b28e52fa2d60c86bf736 Mon Sep 17 00:00:00 2001 From: LiangJun He <2005hithlj@163.com> Date: Tue, 9 Aug 2022 09:48:51 +0800 Subject: [PATCH] HBASE-27275 graceful_stop.sh unable to restore the balance state (#4680) Signed-off-by: Duo Zhang (cherry picked from commit b431652e48e7cd003c7f8cad4eb9e3065cb0b40f) (cherry picked from commit 027165e25277d4dde4a6a035ab29fc980213ed37) Change-Id: Ic7175d32792e27b5d74c120cc646e71ee546c18f --- bin/graceful_stop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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