From 2aaad4000ae2e7a33fb0753f51b89dfd3763f519 Mon Sep 17 00:00:00 2001 From: bibinchundatt Date: Wed, 11 Jul 2018 16:19:51 +0530 Subject: [PATCH] YARN-8491. TestServiceCLI#testEnableFastLaunch fail when umask is 077. Contributed by K G Bakthavachalam. (cherry picked from commit 52e1bc8539ce769f47743d8b2d318a54c3887ba0) --- .../apache/hadoop/yarn/service/client/TestServiceCLI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/client/TestServiceCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/client/TestServiceCLI.java index 78a81988188..363fe91373f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/client/TestServiceCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/client/TestServiceCLI.java @@ -121,12 +121,16 @@ public class TestServiceCLI { basedir = new File("target", "apps"); basedirProp = YARN_SERVICE_BASE_PATH + "=" + basedir.getAbsolutePath(); conf.set(YARN_SERVICE_BASE_PATH, basedir.getAbsolutePath()); + fs = new SliderFileSystem(conf); dependencyTarGzBaseDir = tmpFolder.getRoot(); + fs.getFileSystem() + .setPermission(new Path(dependencyTarGzBaseDir.getAbsolutePath()), + new FsPermission("755")); dependencyTarGz = getDependencyTarGz(dependencyTarGzBaseDir); dependencyTarGzProp = DEPENDENCY_TARBALL_PATH + "=" + dependencyTarGz .toString(); conf.set(DEPENDENCY_TARBALL_PATH, dependencyTarGz.toString()); - fs = new SliderFileSystem(conf); + if (basedir.exists()) { FileUtils.deleteDirectory(basedir); } else {