-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-17178][SPARKR][SPARKSUBMIT] Allow to set sparkr shell command through --conf #14744
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
|
Test build #64171 has finished for PR 14744 at commit
|
|
@vanzin Could you help review this ? |
|
Test build #64172 has finished for PR 14744 at commit
|
docs/configuration.md
Outdated
| <td><code>spark.r.shell.command</code></td> | ||
| <td>R</td> | ||
| <td> | ||
| Executable for executing R shell in both client mode and cluster mode. For now sparkr shell only supports |
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.
It might be not so proper to mention "executing R shell in both client mode and cluster mode" in Spark's doc, AFAIK it is a Livy-only feature. sparkr can only run in client mode for now in Spark. So described here may confuse the user.
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.
Make sense.
docs/configuration.md
Outdated
| <td><code>spark.r.shell.command</code></td> | ||
| <td>R</td> | ||
| <td> | ||
| Executable for executing R shell. |
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.
"Executable for sparkR shell"?
"Executable for R when running the sparkR shell"?
(the sparkR shell command starts with lower case s)
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.
maybe "Executable for executing the SparkR shell. Ignored in cluster modes.". Don't have strong opinion on the wording, just be sure to be consistent with the existing description for other 2 related options. The old descriptions can be updated together.
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.
+1 would be good to explain how this is different from spark.r.driver.command
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.
we should clarify how this works with SPARKR_DRIVER_R too
|
Could you open a JIRA on this and add more info on why this is needed and can't use |
|
Test build #64191 has finished for PR 14744 at commit
|
|
@felixcheung, I guess that spark conf is preferred over env variable. |
|
@zjffdu, basically LGTM |
|
LGTM. I agree that using SparkConf is preferable over environment variables -- but it would be good to make the documentation clear on when each option is used. |
|
Test build #64382 has finished for PR 14744 at commit
|
|
|
||
| List<String> args = new ArrayList<>(); | ||
| args.add(firstNonEmpty(System.getenv("SPARKR_DRIVER_R"), "R")); | ||
| args.add(firstNonEmpty(firstNonEmpty(conf.get(SparkLauncher.SPARKR_R_SHELL), |
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.
I think you can do this instead:
args.add(firstNonEmpty(conf.get(SparkLauncher.SPARKR_R_SHELL), System.getenv("SPARKR_DRIVER_R"), "R"));
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.
ah, right, my mistake. :(
|
Test build #64391 has finished for PR 14744 at commit
|
|
Test build #64413 has finished for PR 14744 at commit
|
|
@shivaram @sun-rui @felixcheung Any more comments ? |
|
Jenkins, retest this please |
|
Test build #64685 has finished for PR 14744 at commit
|
|
LGTM |
|
LGTM, thanks! |
What changes were proposed in this pull request?
Allow user to set sparkr shell command through --conf spark.r.shell.command
How was this patch tested?
Unit test is added and also verify it manually through