You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zjffdu <gi...@git.apache.org> on 2017/03/01 02:32:19 UTC

[GitHub] spark pull request #16907: [SPARK-19572][SPARKR] Allow to disable hive in sp...

Github user zjffdu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16907#discussion_r103599670
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/api/r/SQLUtils.scala ---
    @@ -47,12 +47,15 @@ private[sql] object SQLUtils extends Logging {
           jsc: JavaSparkContext,
           sparkConfigMap: JMap[Object, Object],
           enableHiveSupport: Boolean): SparkSession = {
    -    val spark = if (SparkSession.hiveClassesArePresent && enableHiveSupport) {
    +    val spark = if (SparkSession.hiveClassesArePresent && enableHiveSupport
    +        && jsc.sc.conf.get(CATALOG_IMPLEMENTATION.key, "hive").toLowerCase == "hive") {
           SparkSession.builder().sparkContext(withHiveExternalCatalog(jsc.sc)).getOrCreate()
         } else {
    -      if (enableHiveSupport) {
    +      if (enableHiveSupport
    +        && 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', " +
    --- End diff --
    
    Good catch, I updated the if condition to match the message. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org