HBASE-16021 graceful_stop.sh: Wrap variables in double quote to avoid "[: too many arguments" error (Samir Ahmic)

This commit is contained in:
tedyu 2016-06-14 15:36:11 -07:00
parent 1621257e7a
commit b69c77ac1a
1 changed files with 2 additions and 2 deletions

View File

@ -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