saintstack commented on a change in pull request #3052:
URL: https://github.com/apache/hbase/pull/3052#discussion_r595472685



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterMetaBootstrap.java
##########
@@ -61,25 +60,25 @@ void assignMetaReplicas()
       throw new IllegalStateException("hbase:meta must be initialized first 
before we can " +
           "assign out its replicas");
     }
-    ServerName metaServername = 
MetaTableLocator.getMetaRegionLocation(this.master.getZooKeeper());
+
     for (int i = 1; i < numReplicas; i++) {
       // Get current meta state for replica from zk.
-      RegionState metaState = 
MetaTableLocator.getMetaRegionState(master.getZooKeeper(), i);
       RegionInfo hri = RegionReplicaUtil.getRegionInfoForReplica(
-          RegionInfoBuilder.FIRST_META_REGIONINFO, i);
-      LOG.debug(hri.getRegionNameAsString() + " replica region state from 
zookeeper=" + metaState);
-      if (metaServername.equals(metaState.getServerName())) {
-        metaState = null;
-        LOG.info(hri.getRegionNameAsString() +
-          " old location is same as current hbase:meta location; setting 
location as null...");
-      }

Review comment:
       We don't need this handling anymore?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -1018,7 +1018,7 @@ private void 
finishActiveMasterInitialization(MonitoredTask status)
     RegionState rs = this.assignmentManager.getRegionStates().
         getRegionState(RegionInfoBuilder.FIRST_META_REGIONINFO);
     LOG.info("hbase:meta {}", rs);
-    if (rs != null && rs.isOffline()) {
+    if ((rs == null) || (rs != null && rs.isOffline())) {

Review comment:
       No RegionState for replicas?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to