[SPARK-17178][SPARKR][SPARKSUBMIT] Allow to set sparkr shell command through --conf#14744
[SPARK-17178][SPARKR][SPARKSUBMIT] Allow to set sparkr shell command through --conf#14744zjffdu wants to merge 6 commits intoapache:masterfrom
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.
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.
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.
"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.
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.
+1 would be good to explain how this is different from spark.r.driver.command
There was a problem hiding this comment.
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.
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.
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