Skip to content

Commit 06fbdd2

Browse files
committed
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
1 parent be3fbc8 commit 06fbdd2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

hadoop-mapreduce-project/CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ Release 2.4.1 - UNRELEASED
192192
MAPREDUCE-5815. Fixed test-failure of TestMRAppMaster by making MRAppMaster
193193
gracefully handle empty-queue names. (Akira Ajisaka via vinodkv)
194194

195+
MAPREDUCE-5826. Fixed HistoryServerFileSystemStore to use right permissions
196+
on Windows for temporary files and thus also fix the test-issue with
197+
TestHistoryServerFileSystemStateStoreService. (Varun Vasudev via vinodkv)
198+
195199
Release 2.4.0 - 2014-04-07
196200

197201
INCOMPATIBLE CHANGES

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerFileSystemStateStoreService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import org.apache.hadoop.mapreduce.v2.api.MRDelegationTokenIdentifier;
4242
import org.apache.hadoop.mapreduce.v2.jobhistory.JHAdminConfig;
4343
import org.apache.hadoop.security.token.delegation.DelegationKey;
44+
import org.apache.hadoop.util.Shell;
4445

4546
@Private
4647
@Unstable
@@ -65,8 +66,8 @@ public class HistoryServerFileSystemStateStoreService
6566
private static final String TMP_FILE_PREFIX = "tmp-";
6667
private static final FsPermission DIR_PERMISSIONS =
6768
new FsPermission((short)0700);
68-
private static final FsPermission FILE_PERMISSIONS =
69-
new FsPermission((short)0400);
69+
private static final FsPermission FILE_PERMISSIONS = Shell.WINDOWS
70+
? new FsPermission((short) 0700) : new FsPermission((short) 0400);
7071
private static final int NUM_TOKEN_BUCKETS = 1000;
7172

7273
private FileSystem fs;

0 commit comments

Comments
 (0)