From c1127d19c4233b0d9c2d5016069276c391c895b0 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Fri, 11 Apr 2014 04:28:57 +0000 Subject: [PATCH] MAPREDUCE-5826. Fixed HistoryServerFileSystemStore to use right permissions on Windows for temporary files and thus also fix the test-issue with TestHistoryServerFileSystemStateStoreService. Contributed by Varun Vasudev. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1586567 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 4 ++++ .../v2/hs/HistoryServerFileSystemStateStoreService.java | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index b1c7cb66a3e..63a421abab3 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -192,6 +192,10 @@ Release 2.4.1 - UNRELEASED MAPREDUCE-5815. Fixed test-failure of TestMRAppMaster by making MRAppMaster gracefully handle empty-queue names. (Akira Ajisaka via vinodkv) + MAPREDUCE-5826. Fixed HistoryServerFileSystemStore to use right permissions + on Windows for temporary files and thus also fix the test-issue with + TestHistoryServerFileSystemStateStoreService. (Varun Vasudev via vinodkv) + Release 2.4.0 - 2014-04-07 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerFileSystemStateStoreService.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerFileSystemStateStoreService.java index 33984cbabbc..d92a9af4b07 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerFileSystemStateStoreService.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerFileSystemStateStoreService.java @@ -41,6 +41,7 @@ import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.mapreduce.v2.api.MRDelegationTokenIdentifier; import org.apache.hadoop.mapreduce.v2.jobhistory.JHAdminConfig; import org.apache.hadoop.security.token.delegation.DelegationKey; +import org.apache.hadoop.util.Shell; @Private @Unstable @@ -65,8 +66,8 @@ public class HistoryServerFileSystemStateStoreService private static final String TMP_FILE_PREFIX = "tmp-"; private static final FsPermission DIR_PERMISSIONS = new FsPermission((short)0700); - private static final FsPermission FILE_PERMISSIONS = - new FsPermission((short)0400); + private static final FsPermission FILE_PERMISSIONS = Shell.WINDOWS + ? new FsPermission((short) 0700) : new FsPermission((short) 0400); private static final int NUM_TOKEN_BUCKETS = 1000; private FileSystem fs;