HBASE-19726 Failed to start HMaster due to infinite retrying on meta assign; 
ADDENDUM Fix failing TestMetaWithReplicas#testShutdownHandling; it was reading 
meta TableState


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

Branch: refs/heads/HBASE-19064
Commit: b0e998f2a50a50a8d84daa35baff1d4ac99d1c6a
Parents: 2e1ec3d
Author: Michael Stack <st...@apache.org>
Authored: Sat Feb 3 21:49:42 2018 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Sat Feb 3 21:51:50 2018 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b0e998f2/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index f80bbc0..5dc0565 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1109,6 +1109,9 @@ public class MetaTableAccessor {
   @Nullable
   public static TableState getTableState(Connection conn, TableName tableName)
       throws IOException {
+    if (tableName.equals(TableName.META_TABLE_NAME)) {
+      return new TableState(tableName, TableState.State.ENABLED);
+    }
     Table metaHTable = getMetaHTable(conn);
     Get get = new Get(tableName.getName()).addColumn(getTableFamily(), 
getTableStateColumn());
     long time = EnvironmentEdgeManager.currentTime();

Reply via email to