Uh oh!
There was an error while loading. Please reload this page.
[SPARK-41943][CORE] Use java api to create files and grant permissions - #39448
[SPARK-41943][CORE] Use java api to create files and grant permissions#39448smallzhongfeng wants to merge 3 commits into
Conversation
| * Create a directory that is writable by the group. | ||
| * Grant the permission 770 "rwxrwx---" to the directory so the shuffle server can | ||
| * create subdirs/files within the merge folder. | ||
| * TODO: Find out why can't we create a dir using java api with permission 770 |
There was a problem hiding this comment.
For TODO, maybe we can see https://bugs.openjdk.org/browse/JDK-8220013
There was a problem hiding this comment.
Mind summarizing why we can use this approach while the JDK issue isn't resolved?
There was a problem hiding this comment.
In unix like systems every process has a property called umask which is masked onto the permissions of any file created and inherited by child processes. the default is 0002 or "turn off write for others". So it's most likely that Java is setting the permission you seek and then it's being masked out. At present, this issue has not been resolved, so my current approach is to create a directory first, and then explicitly grant permissions.
mridulm
commented
Jan 8, 2023
+CC @zhouyejoe |
smallzhongfeng
commented
Jan 8, 2023
cc @cloud-fan@HyukjinKwon@LuciferYang @@zhouyejoe Hope to get your opinion. :) |
zhouyejoe
commented
Jan 9, 2023
There was a long discussion thread regarding this implementation in this PR. There will be some issue with setgid. |
smallzhongfeng
commented
Jan 9, 2023
Thank you for reminding me @zhouyejoe . I looked at the results of the discussion and it seems to be consistent with my handling method. You can see #35085 (comment) |
Yeah I think this is fine. |
smallzhongfeng
commented
Jan 9, 2023
Could you take another look for this? @mridulm@zhouyejoe@HyukjinKwon@Kimahriman@cloud-fan THX! |
AmplabJenkins
commented
Jan 9, 2023
Can one of the admins verify this patch? |
cloud-fan
commented
Jan 10, 2023
thanks, merging to master! |
What changes were proposed in this pull request?
For method
createDirWithPermission770, using java api to create files and grant permissions instead of calling shell commands.Why are the changes needed?
Safer and more efficient.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Origin uts.