diff options
author | Cheng Hao <hao.cheng@intel.com> | 2014-09-26 12:06:01 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-09-26 12:06:01 -0700 |
commit | 7364fa5a176da69e425bca0e3e137ee73275c78c (patch) | |
tree | fd3fb110c158df8e897c19cc8b23cd8fef969bdb /sql/hive-thriftserver | |
parent | 0ec2d2e8f0c0dc61a7ed6377898846661d2424cd (diff) | |
download | spark-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-x | sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala | 17 |
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] => |