YARN-5862. TestDiskFailures.testLocalDirsFailures failed (Yufei Gu via Varun Saxena)

(cherry picked from commit c202a10923)
This commit is contained in:
Varun Saxena 2016-11-10 11:41:34 +05:30
parent a6146a1026
commit 06c8ebdb83
1 changed files with 3 additions and 1 deletions

View File

@ -244,7 +244,9 @@ public class TestDiskFailures {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
Iterator<RMNode> iter = yarnCluster.getResourceManager().getRMContext() Iterator<RMNode> iter = yarnCluster.getResourceManager().getRMContext()
.getRMNodes().values().iterator(); .getRMNodes().values().iterator();
if ((iter.next().getState() != NodeState.UNHEALTHY) == isHealthy) { // RMNode # might be zero because of timing related issue.
if (iter.hasNext() &&
(iter.next().getState() != NodeState.UNHEALTHY) == isHealthy) {
break; break;
} }
// wait for the node health info to go to RM // wait for the node health info to go to RM