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

This commit is contained in:
Varun Saxena 2016-11-10 11:41:34 +05:30
parent 71adf44c3f
commit c202a10923
1 changed files with 3 additions and 1 deletions

View File

@ -244,7 +244,9 @@ private void verifyDisksHealth(boolean localORLogDirs, String expectedDirs,
for (int i = 0; i < 10; i++) {
Iterator<RMNode> iter = yarnCluster.getResourceManager().getRMContext()
.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;
}
// wait for the node health info to go to RM