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
Prev Previous commit
add error log
  • Loading branch information
cloud-fan committed Sep 9, 2019
commit 05db8602d0ef8c98f0f4d70ef8a4d67bb3f73692
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,16 @@ class CatalogManager(conf: SQLConf, defaultSessionCatalog: TableCatalog) extends
// If the V2_SESSION_CATALOG config is specified, we try to instantiate the user-specified v2
// session catalog. Otherwise, return the default session catalog.
def v2SessionCatalog: CatalogPlugin = {
if (conf.getConf(SQLConf.V2_SESSION_CATALOG).isDefined) {
conf.getConf(SQLConf.V2_SESSION_CATALOG).map { customV2SessionCatalog =>
try {
catalogs.getOrElseUpdate(CatalogManager.SESSION_CATALOG_NAME, loadV2SessionCatalog())
} catch {
case NonFatal(_) => defaultSessionCatalog
case NonFatal(_) =>
logError(
"Fail to instantiate the custom v2 session catalog: " + customV2SessionCatalog)
defaultSessionCatalog
}
} else {
defaultSessionCatalog
}
}.getOrElse(defaultSessionCatalog)
}

private def getDefaultNamespace(c: CatalogPlugin) = c match {
Expand Down