From f21fb808f1fd919894d0b25d65cee4730d3a6c00 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Wed, 24 Jun 2015 16:37:39 +0000 Subject: [PATCH] YARN-3832. Resource Localization fails on a cluster due to existing cache directories. Contributed by Brahma Reddy Battula (cherry picked from commit 8d58512d6e6d9fe93784a9de2af0056bcc316d96) (cherry picked from commit 15b1800b1289d239cbebc5cfd66cfe156d45a2d3) (cherry picked from commit 38400507e3352d83c2a1f364de137366249b7983) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../localizer/ResourceLocalizationService.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 6b46619779d..1f4d8519241 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -156,6 +156,9 @@ Release 2.6.1 - UNRELEASED YARN-3585. NodeManager cannot exit on SHUTDOWN event triggered and NM recovery is enabled (Rohith Sharmaks via jlowe) + YARN-3832. Resource Localization fails on a cluster due to existing cache + directories (Brahma Reddy Battula via jlowe) + Release 2.6.0 - 2014-11-18 INCOMPATIBLE CHANGES 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 d38bb7a7766..2a4d350ec6d 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 @@ -1271,7 +1271,7 @@ public class ResourceLocalizationService extends CompositeService } private void cleanUpLocalDirs(FileContext lfs, DeletionService del) { - for (String localDir : dirsHandler.getLocalDirs()) { + for (String localDir : dirsHandler.getLocalDirsForCleanup()) { cleanUpLocalDir(lfs, del, localDir); } }