diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java index afbbae947e1..b5403e8764b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java @@ -995,8 +995,10 @@ public class ResourceLocalizationService extends CompositeService getLocalResourcesTracker(LocalResourceVisibility.APPLICATION, user, applicationId); final String diagnostics = "Failed to download resource " + assoc.getResource() + " " + e.getCause(); - tracker.handle(new ResourceFailedLocalizationEvent( - assoc.getResource().getRequest(), diagnostics)); + if(tracker != null) { + tracker.handle(new ResourceFailedLocalizationEvent( + assoc.getResource().getRequest(), diagnostics)); + } publicRsrc.handle(new ResourceFailedLocalizationEvent( assoc.getResource().getRequest(), diagnostics)); LOG.error(diagnostics);