Skip to content

Conversation

@zjffdu
Copy link
Contributor

@zjffdu zjffdu commented Feb 13, 2017

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.

@SparkQA
Copy link

SparkQA commented Feb 13, 2017

Test build #72801 has started for PR 16907 at commit 8329be6.

@zjffdu zjffdu changed the title [SPARK-19582][SPARKR] Allow to disable hive in sparkR shell [SPARK-19572][SPARKR] Allow to disable hive in sparkR shell Feb 13, 2017
@SparkQA
Copy link

SparkQA commented Feb 13, 2017

Test build #72810 has finished for PR 16907 at commit 9a3aea6.

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

@zjffdu
Copy link
Contributor Author

zjffdu commented Feb 13, 2017

@felixcheung Please help review.

} else {
if (enableHiveSupport) {
if (enableHiveSupport
&& jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive") == "hive") {
Copy link
Member

@felixcheung felixcheung Feb 13, 2017

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.

Copy link
Member

Choose a reason for hiding this comment

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

@felixcheung
Copy link
Member

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") {
Copy link
Member

Choose a reason for hiding this comment

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

@zjffdu
Copy link
Contributor Author

zjffdu commented Feb 14, 2017

Address the comments. @felixcheung, correct, shell.R is not supposed to be used outside. This ticket is mainly for disabling hive in sparkR shell, sparkR batch mode already support this feature.

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

test failed? #16907 (comment)

@SparkQA
Copy link

SparkQA commented Feb 14, 2017

Test build #72842 has finished for PR 16907 at commit 6839c02.

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

@SparkQA
Copy link

SparkQA commented Feb 15, 2017

Test build #72915 has finished for PR 16907 at commit ee20be3.

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

@zjffdu
Copy link
Contributor Author

zjffdu commented Feb 24, 2017

Seems a flaky test, let me trigger the build

@SparkQA
Copy link

SparkQA commented Feb 24, 2017

Test build #73416 has finished for PR 16907 at commit 68b5823.

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

Copy link
Member

@felixcheung felixcheung left a 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?

@zjffdu
Copy link
Contributor Author

zjffdu commented Feb 25, 2017

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', " +
Copy link
Member

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"

Copy link
Contributor Author

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.

@SparkQA
Copy link

SparkQA commented Mar 1, 2017

Test build #73642 has finished for PR 16907 at commit 89a8752.

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

asfgit pushed a commit that referenced this pull request Mar 1, 2017
## 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]>
@felixcheung
Copy link
Member

merged to master and branch-2.1

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.

3 participants