aboutsummaryrefslogtreecommitdiff
path: root/sql/hive-thriftserver
diff options
context:
space:
mode:
authorCheng Hao <hao.cheng@intel.com>2014-09-26 12:06:01 -0700
committerMichael Armbrust <michael@databricks.com>2014-09-26 12:06:01 -0700
commit7364fa5a176da69e425bca0e3e137ee73275c78c (patch)
treefd3fb110c158df8e897c19cc8b23cd8fef969bdb /sql/hive-thriftserver
parent0ec2d2e8f0c0dc61a7ed6377898846661d2424cd (diff)
downloadspark-7364fa5a176da69e425bca0e3e137ee73275c78c.tar.gz
spark-7364fa5a176da69e425bca0e3e137ee73275c78c.tar.bz2
spark-7364fa5a176da69e425bca0e3e137ee73275c78c.zip
[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
Diffstat (limited to 'sql/hive-thriftserver')
-rwxr-xr-xsql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala17
1 files changed, 0 insertions, 17 deletions
diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
index b092f42372..7ba4564602 100755
--- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
+++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
@@ -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] =>