Skip to content

Conversation

@zjffdu
Copy link
Contributor

@zjffdu zjffdu commented Aug 22, 2016

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

bin/sparkr --master yarn-client --conf spark.r.shell.command=/usr/local/bin/R

@SparkQA
Copy link

SparkQA commented Aug 22, 2016

Test build #64171 has finished for PR 14744 at commit 6560ddc.

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

@zjffdu
Copy link
Contributor Author

zjffdu commented Aug 22, 2016

@vanzin Could you help review this ?

@SparkQA
Copy link

SparkQA commented Aug 22, 2016

Test build #64172 has finished for PR 14744 at commit f0231f9.

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

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.

<td><code>spark.r.shell.command</code></td>
<td>R</td>
<td>
Executable for executing R shell.
Copy link
Member

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)

Copy link
Contributor

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.

Copy link
Contributor

@shivaram shivaram Aug 24, 2016

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

Copy link
Member

@felixcheung felixcheung Aug 24, 2016

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

@felixcheung
Copy link
Member

Could you open a JIRA on this and add more info on why this is needed and can't use SPARKR_DRIVER_R?

@SparkQA
Copy link

SparkQA commented Aug 22, 2016

Test build #64191 has finished for PR 14744 at commit 0a24b2d.

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

@zjffdu zjffdu changed the title [SPARKR][SPARKSUBMIT] Allow to set sparkr shell command through --conf [SPARK-17178][SPARKR][SPARKSUBMIT] Allow to set sparkr shell command through --conf Aug 22, 2016
@felixcheung
Copy link
Member

@shivaram @sun-rui thought?

@sun-rui
Copy link
Contributor

sun-rui commented Aug 24, 2016

@felixcheung, I guess that spark conf is preferred over env variable.

@sun-rui
Copy link
Contributor

sun-rui commented Aug 24, 2016

@zjffdu, basically LGTM

@shivaram
Copy link
Contributor

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.

@SparkQA
Copy link

SparkQA commented Aug 25, 2016

Test build #64382 has finished for PR 14744 at commit fa11d2a.

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


List<String> args = new ArrayList<>();
args.add(firstNonEmpty(System.getenv("SPARKR_DRIVER_R"), "R"));
args.add(firstNonEmpty(firstNonEmpty(conf.get(SparkLauncher.SPARKR_R_SHELL),
Copy link
Member

@felixcheung felixcheung Aug 25, 2016

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"));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, right, my mistake. :(

@SparkQA
Copy link

SparkQA commented Aug 25, 2016

Test build #64391 has finished for PR 14744 at commit 3303c53.

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

@SparkQA
Copy link

SparkQA commented Aug 25, 2016

Test build #64413 has finished for PR 14744 at commit bb75190.

  • This patch fails from timeout after a configured wait of 250m.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zjffdu
Copy link
Contributor Author

zjffdu commented Aug 31, 2016

@shivaram @sun-rui @felixcheung Any more comments ?

@shivaram
Copy link
Contributor

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Aug 31, 2016

Test build #64685 has finished for PR 14744 at commit bb75190.

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

@sun-rui
Copy link
Contributor

sun-rui commented Aug 31, 2016

LGTM

@felixcheung
Copy link
Member

LGTM, thanks!

@asfgit asfgit closed this in fa63479 Aug 31, 2016
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.

6 participants