HBASE-15145 HBCK and Replication should authenticate to zookepeer using server principal

This commit is contained in:
Enis Soztutar 2016-01-26 14:43:24 -08:00
parent de62ad150d
commit d4610df32e
2 changed files with 14 additions and 0 deletions

View File

@ -77,6 +77,7 @@ if [ $# = 0 ]; then
echo "Options:"
echo " --config DIR Configuration direction to use. Default: ./conf"
echo " --hosts HOSTS Override the list in 'regionservers' file"
echo " --auth-as-server Authenticate to ZooKeeper using servers configuration"
echo ""
echo "Commands:"
echo "Some commands take arguments. Pass no args or -h for usage."
@ -280,6 +281,14 @@ 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
fi
# figure out which class to run
if [ "$COMMAND" = "shell" ] ; then
# eg export JRUBY_HOME=/usr/local/share/jruby

View File

@ -61,6 +61,11 @@ do
hosts=$1
shift
HBASE_REGIONSERVERS=$hosts
elif [ "--auth-as-server" = "$1" ]
then
shift
# shellcheck disable=SC2034
AUTH_AS_SERVER="true"
else
# Presume we are at end of options and break
break