diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 9b89cd02fb4..ff4afbc8cf7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -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() {