YARN-6801. NPE in RM while setting collectors map in NodeHeartbeatResponse. Contributed by Vrushali C.
This commit is contained in:
parent
ac7f52df83
commit
660413165a
|
@ -620,7 +620,10 @@ public class ResourceTrackerService extends AbstractService implements
|
|||
Map<ApplicationId, RMApp> rmApps = rmContext.getRMApps();
|
||||
// Set collectors for all running apps on this node.
|
||||
for (ApplicationId appId : runningApps) {
|
||||
AppCollectorData appCollectorData = rmApps.get(appId).getCollectorData();
|
||||
RMApp app = rmApps.get(appId);
|
||||
if (app != null) {
|
||||
AppCollectorData appCollectorData = rmApps.get(appId)
|
||||
.getCollectorData();
|
||||
if (appCollectorData != null) {
|
||||
liveAppCollectorsMap.put(appId, appCollectorData);
|
||||
} else {
|
||||
|
@ -630,6 +633,7 @@ public class ResourceTrackerService extends AbstractService implements
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
response.setAppCollectors(liveAppCollectorsMap);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue