diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 398b12da0af..567789fe9f0 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -100,6 +100,10 @@ Release 2.4.1 - UNRELEASED YARN-1920. Fixed TestFileSystemApplicationHistoryStore failure on windows. (Vinod Kumar Vavilapalli via zjshen) + YARN-1914. Fixed resource-download on NodeManagers to skip permission + verification of public cache files in Windows+local file-system environment. + (Varun Vasudev via vinodkv) + Release 2.4.0 - 2014-04-07 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/FSDownload.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/FSDownload.java index de817033d26..67c3bc79480 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/FSDownload.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/FSDownload.java @@ -36,12 +36,14 @@ import org.apache.hadoop.fs.FileContext; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.FileUtil; +import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Options.Rename; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsAction; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.util.RunJar; +import org.apache.hadoop.util.Shell; import org.apache.hadoop.yarn.api.records.LocalResource; import org.apache.hadoop.yarn.api.records.LocalResourceVisibility; @@ -139,6 +141,16 @@ public class FSDownload implements Callable { if (!checkPublicPermsForAll(fs, sStat, FsAction.READ_EXECUTE, FsAction.READ)) { return false; } + + if (Shell.WINDOWS && fs instanceof LocalFileSystem) { + // Relax the requirement for public cache on LFS on Windows since default + // permissions are "700" all the way up to the drive letter. In this + // model, the only requirement for a user is to give EVERYONE group + // permission on the file and the file will be considered public. + // This code path is only hit when fs.default.name is file:/// (mainly + // in tests). + return true; + } return ancestorsHaveExecutePermissions(fs, current.getParent(), statCache); }