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

View File

@ -244,7 +244,9 @@ private void verifyDisksHealth(boolean localORLogDirs, String expectedDirs,
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