vli02 commented on a change in pull request #3402:
URL: https://github.com/apache/hbase/pull/3402#discussion_r654037619
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
##########
@@ -1661,6 +1661,17 @@ public void regionOffline(final HRegionInfo regionInfo) {
regionOffline(regionInfo, null);
}
+ /**
+ * Marks the region as offline. In addition whether removing it from
+ * replicas and master in-memory server holding map.
+ * <p>
+ * @param regionInfo
+ * @param force
Review comment:
updated. thanks!
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
##########
@@ -882,6 +882,80 @@ public void testDupeStartKey() throws Exception {
assertNoErrors(hbck2);
assertEquals(0, hbck2.getOverlapGroups(table).size());
assertEquals(ROWKEYS.length, countRows());
+
+ MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
+ long totalRegions = cluster.countServedRegions();
+
+ // stop a region servers and run fsck again
+ cluster.stopRegionServer(server);
+ cluster.waitForRegionServerToStop(server, 60);
+
+ // wait for all regions to come online.
+ while (cluster.countServedRegions() < totalRegions) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {}
Review comment:
Sleep can be waken up by interruption before time is up, that should be
normal, I want it not to break the loop until we finished waiting for all
regions to come up.
Thread.sleep() method is defined this way:
https://www.tutorialspoint.com/java/lang/thread_sleep_millis.htm
--
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]