spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felixcheung <...@git.apache.org>
Subject [GitHub] spark pull request #16907: [SPARK-19572][SPARKR] Allow to disable hive in sp...
Date Tue, 28 Feb 2017 18:55:32 GMT
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16907#discussion_r103518625
  
    --- 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 --
    
    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"


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


Mime
View raw message