hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1515138 - in /hbase/branches/0.95: hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Date Sun, 18 Aug 2013 15:34:10 GMT
Author: jxiang
Date: Sun Aug 18 15:34:10 2013
New Revision: 1515138

URL: http://svn.apache.org/r1515138
Log:
HBASE-9234 Rebuilding user regions should ignore system tables

Modified:
    hbase/branches/0.95/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java

Modified: hbase/branches/0.95/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java?rev=1515138&r1=1515137&r2=1515138&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
(original)
+++ hbase/branches/0.95/hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
Sun Aug 18 15:34:10 2013
@@ -84,6 +84,7 @@ public final class TableName implements 
   private String namespaceAsString;
   private byte[] qualifier;
   private String qualifierAsString;
+  private boolean systemTable;
 
   private TableName() {}
 
@@ -209,6 +210,10 @@ public final class TableName implements 
     return name;
   }
 
+  public boolean isSystemTable() {
+    return systemTable;
+  }
+
   @Override
   public String toString() {
     return nameAsString;
@@ -251,6 +256,8 @@ public final class TableName implements 
     tableName.nameAsString =
         createFullyQualified(tableName.namespaceAsString, tableName.qualifierAsString);
     tableName.name = Bytes.toBytes(tableName.nameAsString);
+    tableName.systemTable = Bytes.equals(
+      tableName.namespace, NamespaceDescriptor.SYSTEM_NAMESPACE_NAME);
   }
 
   public static TableName valueOf(byte[] name) {

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1515138&r1=1515137&r2=1515138&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Sun Aug 18 15:34:10 2013
@@ -2655,6 +2655,8 @@ public class AssignmentManager extends Z
       HRegionInfo regionInfo = region.getFirst();
       ServerName regionLocation = region.getSecond();
       if (regionInfo == null) continue;
+      TableName tableName = regionInfo.getTableName();
+      if (tableName.isSystemTable()) continue;
       regionStates.createRegionState(regionInfo);
       if (regionStates.isRegionInState(regionInfo, State.SPLIT)) {
         // Split is considered to be completed. If the split znode still
@@ -2663,7 +2665,6 @@ public class AssignmentManager extends Z
            + " split is completed. Hence need not add to regions list");
         continue;
       }
-      TableName tableName = regionInfo.getTableName();
       if (regionLocation == null) {
         // regionLocation could be null if createTable didn't finish properly.
         // When createTable is in progress, HMaster restarts.



Mime
View raw message