tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gop...@apache.org
Subject [tez] branch branch-0.9 updated: TEZ-4057: Fix Unsorted broadcast shuffle umasks (Eric Wohlstadter, reviewed by Gopal V)
Date Thu, 28 Mar 2019 20:35:14 GMT
This is an automated email from the ASF dual-hosted git repository.

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


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

commit f379c61ac0b303c10f6527497bb044a76194f76c
Author: Eric Wohlstadter <ewohlstadter@cloudera.com>
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 <gopalv@apache.org>
---
 .../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) {


Mime
View raw message