wangyum commented on code in PR #9156:
URL: https://github.com/apache/incubator-gluten/pull/9156#discussion_r2017986752


##########
cpp/core/shuffle/LocalPartitionWriter.cc:
##########
@@ -387,7 +387,9 @@ std::string LocalPartitionWriter::nextSpilledFileDir() {
 
 arrow::Result<std::shared_ptr<arrow::io::OutputStream>> 
LocalPartitionWriter::openFile(const std::string& file) {
   std::shared_ptr<arrow::io::FileOutputStream> fout;
-  ARROW_ASSIGN_OR_RAISE(fout, arrow::io::FileOutputStream::Open(file));
+  auto fd = open(file.c_str(), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR 
| S_IRGRP | S_IROTH);

Review Comment:
   Change it to:
   ```c++
     auto fd = open(file.c_str(), O_WRONLY | O_CREAT | O_TRUNC);
     // Set the shuffle file permissions to 0644 to keep it consistent with the 
permissions of the built-in shuffler manager in Spark.
     fchmod(fd, 0644);
   ```
   
   
   I also tried another way to write it, but it didn't work.
   ```c++
   #include <stdio.h>
   #include <fcntl.h>
   #include <sys/stat.h>
   
   int main () {
       auto fd = open("test-gluten-9148", O_WRONLY | O_CREAT | O_TRUNC, 0644);
       return 0;
   }
   ```
   
   ```
   g++ test.cc &&  ./a.out && ls -l test-gluten-9148
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to