From 81a9c1ac31333f11ad4a5defb9c625daf492513b Mon Sep 17 00:00:00 2001 From: Enis Soztutar Date: Fri, 17 Jun 2016 13:29:33 -0700 Subject: [PATCH] HBASE-16053 Master code is not setting the table in ENABLING state in create table --- .../hadoop/hbase/master/procedure/CreateTableProcedure.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java index 03d433b4af8..da4a73202ed 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java @@ -445,6 +445,10 @@ public class CreateTableProcedure final TableName tableName, final List regions) throws IOException { 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 final AssignmentManager assignmentManager = env.getMasterServices().getAssignmentManager(); ModifyRegionUtils.assignRegions(assignmentManager, regions);