HBASE-26146: Add support for HBASE_HBCK_OPTS (#3534)

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Bryan Beaudreault 2021-07-27 16:10:42 -04:00 committed by GitHub
parent dd22fecc2b
commit d470b25e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 6 deletions

View File

@ -57,6 +57,8 @@
# HBASE_JSHELL_ARGS Additional arguments passed to the jshell. # HBASE_JSHELL_ARGS Additional arguments passed to the jshell.
# Defaults to `--startup DEFAULT --startup PRINTING --startup hbase_startup.jsh` # Defaults to `--startup DEFAULT --startup PRINTING --startup hbase_startup.jsh`
# #
# HBASE_HBCK_OPTS Extra options passed to hbck.
# Defaults to HBASE_SERVER_JAAS_OPTS if specified, or HBASE_REGIONSERVER_OPTS.
bin=`dirname "$0"` bin=`dirname "$0"`
bin=`cd "$bin">/dev/null; pwd` bin=`cd "$bin">/dev/null; pwd`
@ -427,12 +429,18 @@ else
HBASE_OPTS="$HBASE_OPTS $CLIENT_GC_OPTS" HBASE_OPTS="$HBASE_OPTS $CLIENT_GC_OPTS"
fi fi
if [ "$AUTH_AS_SERVER" == "true" ] || [ "$COMMAND" = "hbck" ]; then if [ -n "$HBASE_SERVER_JAAS_OPTS" ]; then
if [ -n "$HBASE_SERVER_JAAS_OPTS" ]; then AUTH_AS_SERVER_OPTS="$HBASE_SERVER_JAAS_OPTS"
HBASE_OPTS="$HBASE_OPTS $HBASE_SERVER_JAAS_OPTS" else
else AUTH_AS_SERVER_OPTS="$HBASE_REGIONSERVER_OPTS"
HBASE_OPTS="$HBASE_OPTS $HBASE_REGIONSERVER_OPTS" fi
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 fi
# check if the command needs jline # check if the command needs jline
@ -559,6 +567,7 @@ elif [ "$COMMAND" = "hbck" ] ; then
CLASS='org.apache.hadoop.hbase.util.HBaseFsck' CLASS='org.apache.hadoop.hbase.util.HBaseFsck'
;; ;;
esac esac
HBASE_OPTS="$HBASE_OPTS $HBASE_HBCK_OPTS"
elif [ "$COMMAND" = "wal" ] ; then elif [ "$COMMAND" = "wal" ] ; then
CLASS='org.apache.hadoop.hbase.wal.WALPrettyPrinter' CLASS='org.apache.hadoop.hbase.wal.WALPrettyPrinter'
elif [ "$COMMAND" = "hfile" ] ; then elif [ "$COMMAND" = "hfile" ] ; then