Skip to content

[SPARK-17125][SPARKR] Allow to specify spark config using non-string type in SparkR - #14699

Closed
zjffdu wants to merge 1 commit into
apache:masterfrom
zjffdu:SPARK-17125
Closed

[SPARK-17125][SPARKR] Allow to specify spark config using non-string type in SparkR#14699
zjffdu wants to merge 1 commit into
apache:masterfrom
zjffdu:SPARK-17125

Conversation

@zjffdu

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Allow to set spark configuration using non-string type in sparkR

How was this patch tested?

Tested manually using the following command

sparkR.session(master="yarn-client", sparkConfig = list(spark.executor.instances=1))

@SparkQA

Copy link
Copy Markdown

Test build #63981 has finished for PR 14699 at commit 5540366.

  • This patch fails SparkR unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@felixcheung

Copy link
Copy Markdown
Member

Your example was failing for a different reason:

Error in invokeJava(isStatic = TRUE, className, methodName, ...) : java.lang.IllegalArgumentException: spark.executor.instances should be int, but was 1.0

Means that your 1 is being interpreted as numeric instead of integer.
This works:

sparkR.session(master="yarn-client", sparkConfig = list(spark.executor.instances=1L))

@zjffdu

Copy link
Copy Markdown
ContributorAuthor

Make sense, @felixcheung Thanks

@felixcheung

Copy link
Copy Markdown
Member

I haven't exhaustively test out configs, not sure always coercing to string might be limiting, in certain cases (eg. user was expecting 1 -> 1.0 (numeric) but now 1 -> "1" (character)

@zjffdu

Copy link
Copy Markdown
ContributorAuthor

@felixcheung In what of case user was expecting 1 -> 1.0 (numeric), because internally SparkConf use string for both key and value.

@felixcheung

Copy link
Copy Markdown
Member

It's hard to say. Right now it is being converted on the JVM side - so it is possible to have 1 -> 1.0 -> "1.0"
Also convertNamedListToEnv are being in several other cases that seem to expect numeric type - could you check that?

@felixcheung

Copy link
Copy Markdown
Member

would you like to follow up or close this?

srowen added a commit to srowen/spark that referenced this pull request Oct 31, 2016
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
Closesapache#11610Closesapache#15411Closesapache#15501Closesapache#12613Closesapache#12518Closesapache#12026Closesapache#15524Closesapache#12693Closesapache#12358Closesapache#15588Closesapache#15635Closesapache#15678Closesapache#14699Closesapache#9008
Author: Sean Owen <sowen@cloudera.com>
Closesapache#15685 from srowen/CloseStalePRs.
Sign up for freeto 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.

3 participants

@zjffdu@SparkQA@felixcheung