ayushtkn commented on a change in pull request #3756:
URL: https://github.com/apache/hadoop/pull/3756#discussion_r763896675
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
##########
@@ -2775,14 +2775,23 @@ public void waitActive(int nnIndex) throws IOException {
DFSClient client = new DFSClient(addr, conf);
// ensure all datanodes have registered and sent heartbeat to the namenode
- while (shouldWait(client.datanodeReport(DatanodeReportType.LIVE), addr)) {
- try {
+ int failedCount = 0;
+ try {
+ while (shouldWait(client.datanodeReport(DatanodeReportType.LIVE), addr))
{
LOG.info("Waiting for cluster to become active");
Thread.sleep(100);
- } catch (InterruptedException e) {
}
+ } catch (IOException e) {
+ failedCount++;
+ // Cached RPC connection to namenode, if any, is expected to fail once
+ if (failedCount > 1) {
Review comment:
the while looped pulled in should solve, else I need to spend some time
during this weekend.
my Holidays ends today. :-)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]