-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-5914] to run spark-submit requiring only user perm on windows #4742
Conversation
Can one of the admins verify this patch? |
@@ -439,7 +439,14 @@ private[spark] object Utils extends Logging { | |||
executeAndGetOutput(Seq("tar", "-xf", fileName), targetDir) | |||
} | |||
// Make the file executable - That's necessary for scripts | |||
FileUtil.chmod(targetFile.getAbsolutePath, "a+x") | |||
if(isWindows){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind adding a space after if
?
Jenkins, test this please. |
Test build #27888 has started for PR 4742 at commit
|
FileUtil.chmod(targetFile.getAbsolutePath, "u+r") | ||
FileUtil.chmod(targetFile.getAbsolutePath, "a+x") | ||
} else { | ||
FileUtil.chmod(targetFile.getAbsolutePath, "a+x") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be in both branches of the if
right -- this boils down to just adding u+r
if isWindows
and not affecting the current line.
Test build #27888 has finished for PR 4742 at commit
|
Test PASSed. |
Looks like the test didn't rerun after submitting updated code? |
Jenkins, retest this please |
Test build #27968 has started for PR 4742 at commit
|
Test build #27968 has finished for PR 4742 at commit
|
Test PASSed. |
LGTM. I'll fix the space before the brace on merge. This seems like a clean, simple fix. |
Because windows on-default does not grant read permission to jars except to admin, spark-submit would fail with "ClassNotFound" exception if user runs slave service with only user permission.
This fix is to add read permission to owner of the jar (which would be the slave service account in windows )