diff options
author | luogankun <luogankun@gmail.com> | 2014-10-20 16:50:51 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-10-20 16:50:51 -0700 |
commit | fce1d41611fdb27956c3394a706ed14960182a83 (patch) | |
tree | 3a07c02a3f32ea284a433880b8107e0bff14ea1f /sql | |
parent | 364d52b707b5c49bc29ce60dbfe6e845a75d5d86 (diff) | |
download | spark-fce1d41611fdb27956c3394a706ed14960182a83.tar.gz spark-fce1d41611fdb27956c3394a706ed14960182a83.tar.bz2 spark-fce1d41611fdb27956c3394a706ed14960182a83.zip |
[SPARK-3945]Properties of hive-site.xml is invalid in running the Thrift JDBC server
Write properties of hive-site.xml to HiveContext when initilize session state in SparkSQLEnv.scala.
The method of SparkSQLEnv.init() in HiveThriftServer2.scala can not write the properties of hive-site.xml to HiveContext. Such as: add configuration property spark.sql.shuffle.partititions in the hive-site.xml.
Author: luogankun <luogankun@gmail.com>
Closes #2800 from luogankun/SPARK-3945 and squashes the following commits:
3679efc [luogankun] [SPARK-3945]Write properties of hive-site.xml to HiveContext when initilize session state In SparkSQLEnv.scala
Diffstat (limited to 'sql')
-rw-r--r-- | sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala index 582264eb59..2136a2ea63 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala @@ -39,7 +39,11 @@ private[hive] object SparkSQLEnv extends Logging { sparkContext.addSparkListener(new StatsReportListener()) hiveContext = new HiveContext(sparkContext) { - @transient override lazy val sessionState = SessionState.get() + @transient override lazy val sessionState = { + val state = SessionState.get() + setConf(state.getConf.getAllProperties) + state + } @transient override lazy val hiveconf = sessionState.getConf } } |