You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2018/01/19 23:49:32 UTC
spark git commit: [SPARK-21771][SQL] remove useless hive client in
SparkSQLEnv
Repository: spark
Updated Branches:
refs/heads/master f6da41b01 -> 793841c6b
[SPARK-21771][SQL] remove useless hive client in SparkSQLEnv
## What changes were proposed in this pull request?
Once a meta hive client is created, it generates its SessionState which creates a lot of session related directories, some deleteOnExit, some does not. if a hive client is useless we may not create it at the very start.
## How was this patch tested?
N/A
cc hvanhovell cloud-fan
Author: Kent Yao <11...@zju.edu.cn>
Closes #18983 from yaooqinn/patch-1.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/793841c6
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/793841c6
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/793841c6
Branch: refs/heads/master
Commit: 793841c6b8b98b918dcf241e29f60ef125914db9
Parents: f6da41b
Author: Kent Yao <11...@zju.edu.cn>
Authored: Fri Jan 19 15:49:29 2018 -0800
Committer: gatorsmile <ga...@gmail.com>
Committed: Fri Jan 19 15:49:29 2018 -0800
----------------------------------------------------------------------
.../org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/793841c6/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 6b19f97..cbd75ad 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
@@ -50,8 +50,7 @@ private[hive] object SparkSQLEnv extends Logging {
sqlContext = sparkSession.sqlContext
val metadataHive = sparkSession
- .sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog]
- .client.newSession()
+ .sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
metadataHive.setOut(new PrintStream(System.out, true, "UTF-8"))
metadataHive.setInfo(new PrintStream(System.err, true, "UTF-8"))
metadataHive.setError(new PrintStream(System.err, true, "UTF-8"))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org