Apache9 commented on a change in pull request #1774:
URL: https://github.com/apache/hbase/pull/1774#discussion_r432194231



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
##########
@@ -1403,6 +1409,21 @@ private static void deleteFromMetaTable(final Connection 
connection, final List<
     }
   }
 
+  public static Delete removeRegionReplica(byte[] metaRow, int 
replicaIndexToDeleteFrom,
+    int numReplicasToRemove) {
+    int absoluteIndex = replicaIndexToDeleteFrom + numReplicasToRemove;
+    long now = EnvironmentEdgeManager.currentTime();
+    Delete deleteReplicaLocations = new Delete(metaRow);
+    for (int i = replicaIndexToDeleteFrom; i < absoluteIndex; i++) {
+      deleteReplicaLocations.addColumns(getCatalogFamily(), 
getServerColumn(i), now);
+      deleteReplicaLocations.addColumns(getCatalogFamily(), 
getSeqNumColumn(i), now);
+      deleteReplicaLocations.addColumns(getCatalogFamily(), 
getStartCodeColumn(i), now);
+      deleteReplicaLocations.addColumns(getCatalogFamily(), 
getServerNameColumn(i), now);
+      deleteReplicaLocations.addColumns(getCatalogFamily(), 
getRegionStateColumn(i), now);
+    }
+    return deleteReplicaLocations;
+  }
+

Review comment:
       No. This is for supportting MasterMetaBootstrap. We do not touch this 
class in the previous PR.




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