HBASE-16053 Master code is not setting the table in ENABLING state in create table

This commit is contained in:
Enis Soztutar 2016-06-17 13:29:33 -07:00
parent 568e37d383
commit 81a9c1ac31
1 changed files with 4 additions and 0 deletions

View File

@ -445,6 +445,10 @@ public class CreateTableProcedure
final TableName tableName, final List<HRegionInfo> regions) throws IOException { final TableName tableName, final List<HRegionInfo> regions) throws IOException {
ProcedureSyncWait.waitRegionServers(env); ProcedureSyncWait.waitRegionServers(env);
// Mark the table as Enabling
env.getMasterServices().getTableStateManager()
.setTableState(tableName, TableState.State.ENABLING);
// Trigger immediate assignment of the regions in round-robin fashion // Trigger immediate assignment of the regions in round-robin fashion
final AssignmentManager assignmentManager = env.getMasterServices().getAssignmentManager(); final AssignmentManager assignmentManager = env.getMasterServices().getAssignmentManager();
ModifyRegionUtils.assignRegions(assignmentManager, regions); ModifyRegionUtils.assignRegions(assignmentManager, regions);