anoopsjohn commented on a change in pull request #3417:
URL: https://github.com/apache/hbase/pull/3417#discussion_r660539542



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
##########
@@ -139,6 +140,31 @@ public static TableDescriptor 
tryUpdateAndGetMetaTableDescriptor(Configuration c
     }
   }
 
+  public static ColumnFamilyDescriptor getTableFamilyDesc(

Review comment:
       This is a META table CF.  Do we have any other util class or so 
(specific for META) where we can include this?
   At least the name should make it clear.  This is actually table state CF in 
Meta.  
   

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -1047,6 +1077,29 @@ private void 
finishActiveMasterInitialization(MonitoredTask status)
     // Set master as 'initialized'.
     setInitialized(true);
 
+    if (tableFamilyDesc == null && replBarrierFamilyDesc == null) {

Review comment:
       In case one is not there also, need to create?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -953,9 +956,26 @@ private void 
finishActiveMasterInitialization(MonitoredTask status)
     if (!waitForMetaOnline()) {
       return;
     }
+    TableDescriptor metaDescriptor = tableDescriptors.get(
+        TableName.META_TABLE_NAME);
+    final ColumnFamilyDescriptor tableFamilyDesc = metaDescriptor
+        .getColumnFamily(HConstants.TABLE_FAMILY);
+    final ColumnFamilyDescriptor replBarrierFamilyDesc =
+        metaDescriptor.getColumnFamily(HConstants.REPLICATION_BARRIER_FAMILY);
+
     this.assignmentManager.joinCluster();
     // The below depends on hbase:meta being online.
-    this.tableStateManager.start();
+    try {
+      this.tableStateManager.start();
+    } catch (NoSuchColumnFamilyException e) {
+      if (tableFamilyDesc == null && replBarrierFamilyDesc == null) {

Review comment:
       Seems 2.0.x had extra table state CF only.  2.1.x Had this replication 
barrier.  When table state CF is missing it causes the startup issue right?
   When its 2.0.x to 2.3.x upgrade, the repBarrier will get auto created?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to