diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index d3d3fc7314..edf69554d5 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1296,6 +1296,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-2979. Removed the needless ClientProtocolProvider configuration from the hadoop-mapreduce-client-core module. (Siddharth Seth via vinodkv) + MAPREDUCE-2985. Fixed findbugs warnings in ResourceLocalizationService. + (Thomas Graves via acmurthy) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-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-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java index 083116a51d..4747360d28 100644 --- a/hadoop-mapreduce-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-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java @@ -289,11 +289,12 @@ public void handle(LocalizationEvent event) { LocalizerContext ctxt = new LocalizerContext( c.getUser(), c.getContainerID(), c.getCredentials()); rsrcs = rsrcReqs.getRequestedResources(); - for (LocalResourceVisibility vis : rsrcs.keySet()) { - tracker = getLocalResourcesTracker(vis, c.getUser(), + for (Map.Entry> e : + rsrcs.entrySet()) { + tracker = getLocalResourcesTracker(e.getKey(), c.getUser(), c.getContainerID().getAppId()); - for (LocalResourceRequest req : rsrcs.get(vis)) { - tracker.handle(new ResourceRequestEvent(req, vis, ctxt)); + for (LocalResourceRequest req : e.getValue()) { + tracker.handle(new ResourceRequestEvent(req, e.getKey(), ctxt)); } } break; @@ -312,10 +313,11 @@ public void handle(LocalizationEvent event) { (ContainerLocalizationCleanupEvent) event; c = rsrcCleanup.getContainer(); rsrcs = rsrcCleanup.getResources(); - for (LocalResourceVisibility vis : rsrcs.keySet()) { - tracker = getLocalResourcesTracker(vis, c.getUser(), + for (Map.Entry> e : + rsrcs.entrySet()) { + tracker = getLocalResourcesTracker(e.getKey(), c.getUser(), c.getContainerID().getAppId()); - for (LocalResourceRequest req : rsrcs.get(vis)) { + for (LocalResourceRequest req : e.getValue()) { tracker.handle(new ResourceReleaseEvent(req, c.getContainerID())); } }