This is an automated email from the ASF dual-hosted git repository.

gopalv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git


The following commit(s) were added to refs/heads/master by this push:
     new 44344a0  TEZ-4057: Fix Unsorted broadcast shuffle umasks (Eric 
Wohlstadter, reviewed by Gopal V)
44344a0 is described below

commit 44344a09ef8e1425ab2f8912a72cbb501b68b19e
Author: Eric Wohlstadter <[email protected]>
AuthorDate: Thu Mar 28 13:23:10 2019 -0700

    TEZ-4057: Fix Unsorted broadcast shuffle umasks (Eric Wohlstadter, reviewed 
by Gopal V)
    
    Signed-off-by: Gopal V <[email protected]>
---
 .../runtime/library/common/writers/UnorderedPartitionedKVWriter.java  | 3 +++
 .../library/common/writers/TestUnorderedPartitionedKVWriter.java      | 4 ++++
 2 files changed, 7 insertions(+)

diff --git 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
index 0486ddc..29478dc 100644
--- 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
+++ 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/writers/UnorderedPartitionedKVWriter.java
@@ -281,6 +281,9 @@ public class UnorderedPartitionedKVWriter extends 
BaseUnorderedPartitionedKVWrit
       skipBuffers = true;
       writer = new IFile.Writer(conf, rfs, finalOutPath, keyClass, valClass,
           codec, outputRecordsCounter, outputRecordBytesCounter);
+      if 
(!SPILL_FILE_PERMS.equals(SPILL_FILE_PERMS.applyUMask(FsPermission.getUMask(conf))))
 {
+        rfs.setPermission(finalOutPath, SPILL_FILE_PERMS);
+      }
     } else {
       skipBuffers = false;
       writer = null;
diff --git 
a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
 
b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
index dfd807b..83bde7b 100644
--- 
a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
+++ 
b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/common/writers/TestUnorderedPartitionedKVWriter.java
@@ -1264,6 +1264,10 @@ public class TestUnorderedPartitionedKVWriter {
 
     assertTrue(localFs.exists(outputFilePath));
     assertTrue(localFs.exists(spillFilePath));
+    assertEquals("Incorrect output permissions", (short)0640,
+        localFs.getFileStatus(outputFilePath).getPermission().toShort());
+    assertEquals("Incorrect index permissions", (short)0640,
+        localFs.getFileStatus(spillFilePath).getPermission().toShort());
 
     // verify no intermediate spill files have been left around
     synchronized (kvWriter.spillInfoList) {

Reply via email to