Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ 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") == "hive") {
SparkSession.builder().sparkContext(withHiveExternalCatalog(jsc.sc)).getOrCreate()
} 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.

logWarning("SparkR: enableHiveSupport is requested for SparkSession but " +
"Spark is not built with Hive; falling back to without Hive support.")
}
Expand Down