YARN-5069. TestFifoScheduler.testResourceOverCommit race condition. Contributed by Eric Badger.

(cherry picked from commit 1217c8f6b4)
This commit is contained in:
Eric Payne 2016-05-16 20:27:07 +00:00
parent 28a2f28e42
commit a552932b38
1 changed files with 2 additions and 1 deletions

View File

@ -1151,7 +1151,8 @@ public class TestFifoScheduler {
waitCount = 0; waitCount = 0;
while (waitCount++ != 20) { while (waitCount++ != 20) {
report_nm1 = rm.getResourceScheduler().getNodeReport(nm1.getNodeId()); report_nm1 = rm.getResourceScheduler().getNodeReport(nm1.getNodeId());
if (report_nm1.getAvailableResource().getMemory() != 0) { if (null != report_nm1 &&
report_nm1.getAvailableResource().getMemory() != 0) {
break; break;
} }
LOG.info("Waiting for RMNodeResourceUpdateEvent to be handled... Tried " LOG.info("Waiting for RMNodeResourceUpdateEvent to be handled... Tried "