caroliney14 commented on a change in pull request #2769:
URL: https://github.com/apache/hbase/pull/2769#discussion_r599783395



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
##########
@@ -176,7 +176,7 @@ private void testSanity(final String testName) throws 
Exception {
   @Test
   public void testRegionAssignmentAfterMasterRecoveryDueToZKExpiry() throws 
Exception {
     MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
-    cluster.startRegionServer();
+    cluster.startRegionServerAndWait(2000);

Review comment:
       @bharathv I'm not sure I follow -- 
`HBaseCluster.waitForRegionServerToStart` uses the same rs online checking 
logic as the `MiniHBaseCluster.startRegionServerAndWait` that is currently 
being used. Both query master's onlineServers list for the rs's online status 
(using `getClusterMetrics().getLiveServerMetrics()`) and both time out if the 
rs cannot be found within that list within the given timeout. Is there any 
difference to using 
`HBaseCluster.waitForRegionServerToStart`/`MiniHBaseCluster.startRegionServerAndWait`
 versus refactoring `waitForServerOnline` to query the master? If we refactored 
`waitForServerOnline` it would still have to use a polling mechanism with 
timeout, right?




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