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,13 +620,17 @@ public class ResourceTrackerService extends AbstractService implements
|
||||||
Map<ApplicationId, RMApp> rmApps = rmContext.getRMApps();
|
Map<ApplicationId, RMApp> rmApps = rmContext.getRMApps();
|
||||||
// Set collectors for all running apps on this node.
|
// Set collectors for all running apps on this node.
|
||||||
for (ApplicationId appId : runningApps) {
|
for (ApplicationId appId : runningApps) {
|
||||||
AppCollectorData appCollectorData = rmApps.get(appId).getCollectorData();
|
RMApp app = rmApps.get(appId);
|
||||||
if (appCollectorData != null) {
|
if (app != null) {
|
||||||
liveAppCollectorsMap.put(appId, appCollectorData);
|
AppCollectorData appCollectorData = rmApps.get(appId)
|
||||||
} else {
|
.getCollectorData();
|
||||||
if (LOG.isDebugEnabled()) {
|
if (appCollectorData != null) {
|
||||||
LOG.debug("Collector for applicaton: " + appId +
|
liveAppCollectorsMap.put(appId, appCollectorData);
|
||||||
" hasn't registered yet!");
|
} else {
|
||||||
|
if (LOG.isDebugEnabled()) {
|
||||||
|
LOG.debug("Collector for applicaton: " + appId +
|
||||||
|
" hasn't registered yet!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue