YARN-8491. TestServiceCLI#testEnableFastLaunch fail when umask is 077. Contributed by K G Bakthavachalam.

(cherry picked from commit 52e1bc8539)
This commit is contained in:
bibinchundatt 2018-07-11 16:19:51 +05:30
parent 9b4ead92c8
commit 2aaad4000a
1 changed files with 5 additions and 1 deletions

View File

@ -121,12 +121,16 @@ public class TestServiceCLI {
basedir = new File("target", "apps"); basedir = new File("target", "apps");
basedirProp = YARN_SERVICE_BASE_PATH + "=" + basedir.getAbsolutePath(); basedirProp = YARN_SERVICE_BASE_PATH + "=" + basedir.getAbsolutePath();
conf.set(YARN_SERVICE_BASE_PATH, basedir.getAbsolutePath()); conf.set(YARN_SERVICE_BASE_PATH, basedir.getAbsolutePath());
fs = new SliderFileSystem(conf);
dependencyTarGzBaseDir = tmpFolder.getRoot(); dependencyTarGzBaseDir = tmpFolder.getRoot();
fs.getFileSystem()
.setPermission(new Path(dependencyTarGzBaseDir.getAbsolutePath()),
new FsPermission("755"));
dependencyTarGz = getDependencyTarGz(dependencyTarGzBaseDir); dependencyTarGz = getDependencyTarGz(dependencyTarGzBaseDir);
dependencyTarGzProp = DEPENDENCY_TARBALL_PATH + "=" + dependencyTarGz dependencyTarGzProp = DEPENDENCY_TARBALL_PATH + "=" + dependencyTarGz
.toString(); .toString();
conf.set(DEPENDENCY_TARBALL_PATH, dependencyTarGz.toString()); conf.set(DEPENDENCY_TARBALL_PATH, dependencyTarGz.toString());
fs = new SliderFileSystem(conf);
if (basedir.exists()) { if (basedir.exists()) {
FileUtils.deleteDirectory(basedir); FileUtils.deleteDirectory(basedir);
} else { } else {