hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-13802 Procedure V2: Master fails to come up due to rollback of create namespace table (Stephen Jiang)
Date Fri, 29 May 2015 09:33:51 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 ffcd4d424 -> 46c9a5b33


HBASE-13802 Procedure V2: Master fails to come up due to rollback of create namespace table
(Stephen Jiang)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/46c9a5b3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/46c9a5b3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/46c9a5b3

Branch: refs/heads/branch-1
Commit: 46c9a5b339a77167960ba5382e6d2f380fc312a8
Parents: ffcd4d4
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri May 29 02:33:39 2015 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri May 29 02:33:39 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/master/procedure/CreateTableProcedure.java      | 3 +++
 .../hadoop/hbase/master/procedure/DeleteTableProcedure.java      | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/46c9a5b3/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java
----------------------------------------------------------------------
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 28b8550..cc4faa8 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
@@ -269,6 +269,9 @@ public class CreateTableProcedure
 
   @Override
   protected boolean acquireLock(final MasterProcedureEnv env) {
+    if (!env.isInitialized() && !getTableName().isSystemTable() ) {
+      return false;
+    }
     return env.getProcedureQueue().tryAcquireTableExclusiveLock(getTableName(), "create table");
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/46c9a5b3/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
index 00812ab..45646e1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
@@ -405,6 +405,8 @@ public class DeleteTableProcedure
 
   protected static void deleteTableStates(final MasterProcedureEnv env, final TableName tableName)
       throws IOException {
-    ProcedureSyncWait.getMasterQuotaManager(env).removeTableFromNamespaceQuota(tableName);
+    if (!tableName.isSystemTable()) {
+      ProcedureSyncWait.getMasterQuotaManager(env).removeTableFromNamespaceQuota(tableName);
+    }
   }
 }
\ No newline at end of file


Mime
View raw message