Skip to content

Commit

Permalink
Add engine log level configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
wForget committed Mar 15, 2024
1 parent b537e8a commit 699d91f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ object SparkSQLEngine extends Logging {
SparkTBinaryFrontendService.renewDelegationToken(session.sparkContext, credentials)
}

kyuubiConf.get(ENGINE_SPARK_LOG_LEVEL).foreach { level =>
session.sparkContext.setLogLevel(level)
}

KyuubiSparkUtil.initializeSparkSession(
session,
kyuubiConf.get(ENGINE_SPARK_INITIALIZE_SQL) ++ kyuubiConf.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3471,4 +3471,17 @@ object KyuubiConf {
.version("1.8.1")
.booleanConf
.createWithDefault(false)

object LOG_LEVEL extends Enumeration {
type LOG_LEVEL = Value
val ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN = Value
}

val ENGINE_SPARK_LOG_LEVEL: OptionalConfigEntry[String] =
buildConf("kyuubi.engine.log.level")
.doc("The initialize sql for Spark engine.")
.version("1.9.1")
.stringConf
.checkValues(LOG_LEVEL)
.createOptional
}

0 comments on commit 699d91f

Please sign in to comment.