-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-2960] Support executing Spark from symlinks #1875
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
Conversation
Can one of the admins verify this patch? |
Jenkins, this is ok to test |
@roji mind opening a JIRA issue for this on https://issues.apache.org/jira/browse/SPARK and adding it in the pull request's title? |
QA tests have started for PR 1875. This patch merges cleanly. |
QA results for PR 1875: |
@mateiz, thanks for the attention. Have opened an issue for this. May I suggest you guys update the contribution guide to specify that an issue be opened alongside pull requests... |
Have just noticed the additional scripts under sbin, which also require treatment. Just before I go ahead and work on that, can you confirm this is a desirable PR? |
Yup, please fix those too. I think this is useful to have. |
@mateiz, added a commit for the sbin scripts. In general the scripts could use a bit of cleanup - the bin and sbin scripts work a bit differently, the sbin-specific spark-config.sh doesn't do much anymore, SPARK_HOME and SPARK_PREFIX are used interchangeably... But it isn't very important. |
QA tests have started for PR 1875. This patch DID NOT merge cleanly! |
QA results for PR 1875: |
Um, am not sure, did something actually go wrong here? |
Yes, your patch no longer merges on master. Please rebase it onto the master branch. |
The current scripts (e.g. pyspark) fail to run when they are executed via symlinks. A common Linux scenario would be to have Spark installed somewhere (e.g. /opt) and have a symlink to it in /usr/bin. Fixed the scripts to traverse symlinks until reaching the actual binary.
Rebased on master and squashed to a single commit, hope all is well now. |
Jenkins, test this please |
QA tests have started for PR 1875 at commit
|
QA tests have finished for PR 1875 at commit
|
Hey @roji, actually I looked at this and I notice that |
Actually I spoke too soon, this fix doesn't seem to work with symlinks to relative paths. You can do
Then it will fail to run, thinking that the path is just "bin" or "/". Maybe it's because you add a / in front. |
It would be nice if you found some best practice way of doing this. |
Actually I notice that there's code for this in our |
Can one of the admins verify this patch? |
Any update here? I think this would be a great feature to have, but perhaps we should close this issue until it is ready to review (to make the size of the PR queue a little more manageable). |
Sorry for dropping out, was involved in other things. @mateiz, I'll take a look at your suggestions in the coming week. |
Alright, let me know when you've had a chance. |
The current scripts (e.g. pyspark) fail to run when they are executed via symlinks. A common Linux scenario would be to have Spark installed somewhere (e.g. /opt) and have a symlink to it in /usr/bin.
Fixed the scripts to traverse symlinks until reaching the actual binary.