Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions bin/hbase
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
# HBASE_SHELL_OPTS Extra options passed to the hbase shell.
# Empty by default.
#
# HBASE_HBCK_OPTS Extra options passed to hbck.
# Defaults to HBASE_SERVER_JAAS_OPTS if specified, or HBASE_REGIONSERVER_OPTS.
bin=`dirname "$0"`
bin=`cd "$bin">/dev/null; pwd`

Expand Down Expand Up @@ -423,12 +425,18 @@ else
HBASE_OPTS="$HBASE_OPTS $CLIENT_GC_OPTS"
fi

if [ "$AUTH_AS_SERVER" == "true" ] || [ "$COMMAND" = "hbck" ]; then
if [ -n "$HBASE_SERVER_JAAS_OPTS" ]; then
HBASE_OPTS="$HBASE_OPTS $HBASE_SERVER_JAAS_OPTS"
else
HBASE_OPTS="$HBASE_OPTS $HBASE_REGIONSERVER_OPTS"
fi
if [ -n "$HBASE_SERVER_JAAS_OPTS" ]; then
AUTH_AS_SERVER_OPTS="$HBASE_SERVER_JAAS_OPTS"
else
AUTH_AS_SERVER_OPTS="$HBASE_REGIONSERVER_OPTS"
fi

if [ "$AUTH_AS_SERVER" == "true" ]; then
HBASE_OPTS="$HBASE_OPTS $AUTH_AS_SERVER_OPTS"
elif [ -z "$HBASE_HBCK_OPTS" ]; then
# The default for hbck should be to use auth-as-server args, for compatibility
# with HBASE-15145
HBASE_HBCK_OPTS="$AUTH_AS_SERVER_OPTS"
fi

# check if the command needs jline
Expand Down Expand Up @@ -545,6 +553,7 @@ elif [ "$COMMAND" = "hbck" ] ; then
CLASS='org.apache.hadoop.hbase.util.HBaseFsck'
;;
esac
HBASE_OPTS="$HBASE_OPTS $HBASE_HBCK_OPTS"
elif [ "$COMMAND" = "wal" ] ; then
CLASS='org.apache.hadoop.hbase.wal.WALPrettyPrinter'
elif [ "$COMMAND" = "hfile" ] ; then
Expand Down