Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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 @@ -36,9 +36,12 @@ object StaticSQLConf {
.createWithDefault(Utils.resolveURI("spark-warehouse").toString)

val CATALOG_IMPLEMENTATION = buildStaticConf("spark.sql.catalogImplementation")
.internal()
.doc("Spark built-in implementation is in-memory and hive, " +
"when set to yourImpl(can be any words), " +
"you need also provide following configurations to make everything going: " +
"`spark.sql.catalogImplementation.yourImpl.builder` " +
"`spark.sql.catalogImplementation.yourImpl.externalCatalog`.")
.stringConf
.checkValues(Set("hive", "in-memory"))
.createWithDefault("in-memory")

val GLOBAL_TEMP_DATABASE = buildStaticConf("spark.sql.globalTempDatabase")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,12 @@ object SparkSession extends Logging {
conf.get(CATALOG_IMPLEMENTATION) match {
case "hive" => HIVE_SESSION_STATE_BUILDER_CLASS_NAME
case "in-memory" => classOf[SessionStateBuilder].getCanonicalName
case other => conf.getOption(s"spark.sql.catalogImplementation.$other.builder")
.getOrElse {
throw new IllegalArgumentException(
s"You need to configure spark.sql.catalogImplementation.$other.builder when " +
s"`$other` configured by spark.sql.catalogImplementation is not in-memory nor hive.")
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ object SharedState extends Logging {
conf.get(CATALOG_IMPLEMENTATION) match {
case "hive" => HIVE_EXTERNAL_CATALOG_CLASS_NAME
case "in-memory" => classOf[InMemoryCatalog].getCanonicalName
case other => conf.getOption(s"spark.sql.catalogImplementation.$other.externalCatalog")
.getOrElse {
throw new IllegalArgumentException(
s"You need to configure spark.sql.catalogImplementation.$other.externalCatalog when " +
s"`$other` configured by spark.sql.catalogImplementation is not in-memory nor hive.")
}
}
}

Expand Down