From b69c77ac1a5f67ced25952f9cf85fac768427880 Mon Sep 17 00:00:00 2001 From: tedyu Date: Tue, 14 Jun 2016 15:36:11 -0700 Subject: [PATCH] HBASE-16021 graceful_stop.sh: Wrap variables in double quote to avoid "[: too many arguments" error (Samir Ahmic) --- bin/graceful_stop.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/graceful_stop.sh b/bin/graceful_stop.sh index 510411eac8a..8d08cc9adb9 100755 --- a/bin/graceful_stop.sh +++ b/bin/graceful_stop.sh @@ -101,7 +101,7 @@ if [ "$localhostname" == "$hostname" ]; then local=true fi -if [ $nob == "true" ]; then +if [ "$nob" == "true" ]; then log "[ $0 ] skipping disabling balancer -nob argument is used" HBASE_BALANCER_STATE=false else @@ -175,7 +175,7 @@ if [ "$restart" != "" ]; then fi # Restore balancer state -if [ $HBASE_BALANCER_STATE != "false" ] && [ $nob != "true" ]; then +if [ "$HBASE_BALANCER_STATE" != "false" ] && [ "$nob" != "true" ]; then log "Restoring balancer state to $HBASE_BALANCER_STATE" echo "balance_switch $HBASE_BALANCER_STATE" | "$bin"/hbase --config ${HBASE_CONF_DIR} shell &> /dev/null else