-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-19572][SPARKR] Allow to disable hive in sparkR shell #16907
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 #72801 has started for PR 16907 at commit |
|
Test build #72810 has finished for PR 16907 at commit
|
|
@felixcheung Please help review. |
| } else { | ||
| if (enableHiveSupport) { | ||
| if (enableHiveSupport | ||
| && jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive") == "hive") { |
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 don't think we should check for this for this message
I think we should have a message for hive support being turned off by conf. Otherwise it will be confusing for someone running sparkR.session(enableHiveSupport = TRUE) and didn't get it.
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.
you need to toLowerCase like here https://github.com/apache/spark/blob/master/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala#L91
|
We should discuss other uses outside of sparkR shell - shell.R is not intended to be an API for reuse outside of the sparkR shell - we have other assumptions in the code that could be easily broken that way. |
| } else { | ||
| if (enableHiveSupport) { | ||
| if (enableHiveSupport | ||
| && jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive") == "hive") { |
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.
you need to toLowerCase like here https://github.com/apache/spark/blob/master/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala#L91
|
Address the comments. @felixcheung, correct, |
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'd be specific to say instead of Hive is disabled via ${CATALOG_IMPLEMENTATION.key}
say ${CATALOG_IMPLEMENTATION.key} is not set to "hive";
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.
Ping @felixcheung, message is updated.
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.
test failed? #16907 (comment)
|
Test build #72842 has finished for PR 16907 at commit
|
|
Test build #72915 has finished for PR 16907 at commit
|
|
Seems a flaky test, let me trigger the build |
|
Test build #73416 has finished for PR 16907 at commit
|
felixcheung
left a comment
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.
LGTM.
You want this in branch-2.1 and master, yes?
|
Yeah, it would be nice to be merged into 2.1 as well. Thanks |
| && jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive").toLowerCase == "hive") { | ||
| logWarning("SparkR: enableHiveSupport is requested for SparkSession but " + | ||
| "Spark is not built with Hive; falling back to without Hive support.") | ||
| s"Spark is not built with Hive or ${CATALOG_IMPLEMENTATION.key} is not set to 'hive', " + |
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.
actually, I notice this when reviewing before merge, I think this check is not matching with the message - in this case we already know CATALOG_IMPLEMENTATION == "hive"
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.
Good catch, I updated the if condition to match the message.
|
Test build #73642 has finished for PR 16907 at commit
|
## What changes were proposed in this pull request? SPARK-15236 do this for scala shell, this ticket is for sparkR shell. This is not only for sparkR itself, but can also benefit downstream project like livy which use shell.R for its interactive session. For now, livy has no control of whether enable hive or not. ## How was this patch tested? Tested it manually, run `bin/sparkR --master local --conf spark.sql.catalogImplementation=in-memory` and verify hive is not enabled. Author: Jeff Zhang <[email protected]> Closes #16907 from zjffdu/SPARK-19572. (cherry picked from commit 7315880) Signed-off-by: Felix Cheung <[email protected]>
|
merged to master and branch-2.1 |
What changes were proposed in this pull request?
SPARK-15236 do this for scala shell, this ticket is for sparkR shell. This is not only for sparkR itself, but can also benefit downstream project like livy which use shell.R for its interactive session. For now, livy has no control of whether enable hive or not.
How was this patch tested?
Tested it manually, run
bin/sparkR --master local --conf spark.sql.catalogImplementation=in-memoryand verify hive is not enabled.