Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

judynash
Copy link
Contributor

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 )

@AmplabJenkins
Copy link

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){
Copy link
Contributor

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?

@pwendell
Copy link
Contributor

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Feb 24, 2015

Test build #27888 has started for PR 4742 at commit 1de3c0e.

  • This patch merges cleanly.

FileUtil.chmod(targetFile.getAbsolutePath, "u+r")
FileUtil.chmod(targetFile.getAbsolutePath, "a+x")
} else {
FileUtil.chmod(targetFile.getAbsolutePath, "a+x")
Copy link
Member

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.

@SparkQA
Copy link

SparkQA commented Feb 24, 2015

Test build #27888 has finished for PR 4742 at commit 1de3c0e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27888/
Test PASSed.

@judynash
Copy link
Contributor Author

Looks like the test didn't rerun after submitting updated code?

@srowen
Copy link
Member

srowen commented Feb 26, 2015

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Feb 26, 2015

Test build #27968 has started for PR 4742 at commit e288e56.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Feb 26, 2015

Test build #27968 has finished for PR 4742 at commit e288e56.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27968/
Test PASSed.

@srowen
Copy link
Member

srowen commented Feb 26, 2015

LGTM. I'll fix the space before the brace on merge. This seems like a clean, simple fix.

@asfgit asfgit closed this in 51a6f90 Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants