Repository: spark
Updated Branches:
  refs/heads/master 364d52b70 -> fce1d4161


[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 <[email protected]>

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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/fce1d416
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/fce1d416
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/fce1d416

Branch: refs/heads/master
Commit: fce1d41611fdb27956c3394a706ed14960182a83
Parents: 364d52b
Author: luogankun <[email protected]>
Authored: Mon Oct 20 16:50:51 2014 -0700
Committer: Michael Armbrust <[email protected]>
Committed: Mon Oct 20 16:50:51 2014 -0700

----------------------------------------------------------------------
 .../org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/fce1d416/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala
----------------------------------------------------------------------
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 582264e..2136a2e 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
       }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to