You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2016/02/10 09:07:28 UTC

hbase git commit: HBASE-15145 HBCK and Replication should authenticate to zookepeer using server principal

Repository: hbase
Updated Branches:
  refs/heads/0.98 fb2657936 -> 6bf47a030


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


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6bf47a03
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6bf47a03
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6bf47a03

Branch: refs/heads/0.98
Commit: 6bf47a03088194b5740315142b3b5fba3a357b66
Parents: fb26579
Author: Enis Soztutar <en...@apache.org>
Authored: Tue Jan 26 14:43:24 2016 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Wed Feb 10 00:06:43 2016 -0800

----------------------------------------------------------------------
 bin/hbase           | 9 +++++++++
 bin/hbase-config.sh | 5 +++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6bf47a03/bin/hbase
----------------------------------------------------------------------
diff --git a/bin/hbase b/bin/hbase
index 0041a47..984f767 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -76,6 +76,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."
@@ -276,6 +277,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

http://git-wip-us.apache.org/repos/asf/hbase/blob/6bf47a03/bin/hbase-config.sh
----------------------------------------------------------------------
diff --git a/bin/hbase-config.sh b/bin/hbase-config.sh
index fb75169..032f306 100644
--- a/bin/hbase-config.sh
+++ b/bin/hbase-config.sh
@@ -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