Skip to content
Snippets Groups Projects
Commit 7364fa5a authored by Cheng Hao's avatar Cheng Hao Committed by Michael Armbrust
Browse files

[SPARK-3393] [SQL] Align the log4j configuration for Spark & SparkSQLCLI

User may be confused for the HQL logging & configurations, we'd better provide a default templates.

Both files are copied from Hive.

Author: Cheng Hao <hao.cheng@intel.com>

Closes #2263 from chenghao-intel/hive_template and squashes the following commits:

53bffa9 [Cheng Hao] Remove the hive-log4j.properties initialization
parent 0ec2d2e8
No related branches found
No related tags found
No related merge requests found
......@@ -73,18 +73,6 @@ private[hive] object SparkSQLCLIDriver {
System.exit(1)
}
// NOTE: It is critical to do this here so that log4j is reinitialized
// before any of the other core hive classes are loaded
var logInitFailed = false
var logInitDetailMessage: String = null
try {
logInitDetailMessage = LogUtils.initHiveLog4j()
} catch {
case e: LogInitializationException =>
logInitFailed = true
logInitDetailMessage = e.getMessage
}
val sessionState = new CliSessionState(new HiveConf(classOf[SessionState]))
sessionState.in = System.in
......@@ -100,11 +88,6 @@ private[hive] object SparkSQLCLIDriver {
System.exit(2)
}
if (!sessionState.getIsSilent) {
if (logInitFailed) System.err.println(logInitDetailMessage)
else SessionState.getConsole.printInfo(logInitDetailMessage)
}
// Set all properties specified via command line.
val conf: HiveConf = sessionState.getConf
sessionState.cmdProperties.entrySet().foreach { item: java.util.Map.Entry[Object, Object] =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment