HBASE-15622 Superusers does not consider the keytab credentials

This commit is contained in:
Matteo Bertozzi 2016-04-15 08:28:39 -07:00
parent 96e9c466d2
commit 6cf4bfe62c
1 changed files with 3 additions and 1 deletions

View File

@ -511,7 +511,6 @@ public class HRegionServer extends HasThread implements
this.conf = conf;
checkCodecs(this.conf);
this.userProvider = UserProvider.instantiate(conf);
Superusers.initialize(conf);
FSUtils.setupShortCircuitRead(this.conf);
// Disable usage of meta replicas in the regionserver
this.conf.setBoolean(HConstants.USE_META_REPLICAS, false);
@ -560,6 +559,9 @@ public class HRegionServer extends HasThread implements
HConstants.ZK_CLIENT_KERBEROS_PRINCIPAL, hostName);
// login the server principal (if using secure Hadoop)
login(userProvider, hostName);
// init superusers and add the server principal (if using security)
// or process owner as default super user.
Superusers.initialize(conf);
regionServerAccounting = new RegionServerAccounting();
uncaughtExceptionHandler = new UncaughtExceptionHandler() {