diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java index 2d98919..1321dd1 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java @@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.NamespaceDescriptor; import org.apache.hadoop.hbase.TableName; @@ -60,6 +61,7 @@ import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp; import org.apache.hadoop.hbase.filter.QualifierFilter; import org.apache.hadoop.hbase.filter.RegexStringComparator; import org.apache.hadoop.hbase.master.MasterServices; +import org.apache.hadoop.hbase.master.procedure.CreateTableProcedure; import org.apache.hadoop.hbase.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos; import org.apache.hadoop.hbase.regionserver.BloomType; @@ -125,7 +127,8 @@ public class AccessControlLists { * @throws IOException */ static void createACLTable(MasterServices master) throws IOException { - master.createTable(new HTableDescriptor(ACL_TABLE_NAME) + /** Table descriptor for ACL table */ + final HTableDescriptor ACL_TABLEDESC = new HTableDescriptor(ACL_TABLE_NAME) .addFamily(new HColumnDescriptor(ACL_LIST_FAMILY) .setMaxVersions(1) .setInMemory(true) @@ -135,10 +138,15 @@ public class AccessControlLists { .setScope(HConstants.REPLICATION_SCOPE_LOCAL) // Set cache data blocks in L1 if more than one cache tier deployed; e.g. this will // be the case if we are using CombinedBlockCache (Bucket Cache). - .setCacheDataInL1(true)), - null, - HConstants.NO_NONCE, - HConstants.NO_NONCE); + .setCacheDataInL1(true)); + + HRegionInfo[] newRegions = new HRegionInfo[] {new HRegionInfo(ACL_TABLE_NAME, null, null)}; + + // we need to create the table this way to bypass checkInitialized + master.getMasterProcedureExecutor().submitProcedure(new CreateTableProcedure( + master.getMasterProcedureExecutor().getEnvironment(), + ACL_TABLEDESC, + newRegions)); } /**