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 bcaf5f2963..870eb0d71b 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 dfbeb44934..da959d7b00 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 @@ public boolean remove(LocalizedResource rem, DeletionService delService) { 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 f49e942ffd..ed110b07e9 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 void handle(ResourceEvent event) { 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 {