From 3e0203a3a428460c1eb9f0f265fb520737b64d55 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Eagles Date: Tue, 6 Aug 2013 19:51:33 +0000 Subject: [PATCH] YARN-985. Nodemanager should log where a resource was localized (Ravi Prakash via jeagles) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1511100 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../containermanager/localizer/LocalResourcesTrackerImpl.java | 1 + .../containermanager/localizer/LocalizedResource.java | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index bcaf5f29639..870eb0d71b2 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -1158,6 +1158,9 @@ Release 0.23.10 - UNRELEASED IMPROVEMENTS + YARN-985. Nodemanager should log where a resource was localized (Ravi + Prakash via jeagles) + OPTIMIZATIONS BUG FIXES 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/LocalResourcesTrackerImpl.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/LocalResourcesTrackerImpl.java index dfbeb449349..da959d7b004 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/LocalResourcesTrackerImpl.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/LocalResourcesTrackerImpl.java @@ -242,6 +242,7 @@ class LocalResourcesTrackerImpl implements LocalResourcesTracker { delService.delete(getUser(), getPathToDelete(rsrc.getLocalPath())); } decrementFileCountForLocalCacheDirectory(rem.getRequest(), rsrc); + LOG.info("Removed " + rsrc.getLocalPath() + " from localized cache"); return true; } } 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/LocalizedResource.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/LocalizedResource.java index f49e942ffd2..ed110b07e99 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/LocalizedResource.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/LocalizedResource.java @@ -193,8 +193,8 @@ public class LocalizedResource implements EventHandler { LOG.warn("Can't handle this event at current state", e); } if (oldState != newState) { - LOG.info("Resource " + resourcePath + " transitioned from " - + oldState + LOG.info("Resource " + resourcePath + (localPath != null ? + "(->" + localPath + ")": "") + " transitioned from " + oldState + " to " + newState); } } finally {