Skip to content
Snippets Groups Projects
Commit fce1d416 authored by luogankun's avatar luogankun Committed by Michael Armbrust
Browse files

[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
parent 364d52b7
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
}
......
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