MAPREDUCE-2985. Fixed findbugs warnings in ResourceLocalizationService. Contributed by Thomas Graves.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1169955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-09-12 21:53:51 +00:00
parent 8332126c52
commit c8383a5f49
2 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -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<LocalResourceVisibility, Collection<LocalResourceRequest>> 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<LocalResourceVisibility, Collection<LocalResourceRequest>> 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()));
}
}