-
- Downloads
[SPARK-4037][SQL] Removes the SessionState instance created in HiveThriftServer2
`HiveThriftServer2` creates a global singleton `SessionState` instance and overrides `HiveContext` to inject the `SessionState` object. This messes up `SessionState` initialization and causes problems. This PR replaces the global `SessionState` with `HiveContext.sessionState` to avoid the initialization conflict. Also `HiveContext` reuses existing started `SessionState` if any (this is required by `SparkSQLCLIDriver`, which uses specialized `CliSessionState`). Author: Cheng Lian <lian@databricks.com> Closes #2887 from liancheng/spark-4037 and squashes the following commits: 8446675 [Cheng Lian] Removes redundant Driver initialization a28fef5 [Cheng Lian] Avoid starting HiveContext.sessionState multiple times 49b1c5b [Cheng Lian] Reuses existing started SessionState if any 3cd6fab [Cheng Lian] Fixes SPARK-4037
Showing
- sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala 1 addition, 16 deletions...pache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
- sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala 7 additions, 11 deletions.../org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala
- sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suite.scala 6 additions, 4 deletions.../spark/sql/hive/thriftserver/HiveThriftServer2Suite.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala 30 additions, 14 deletions...rc/main/scala/org/apache/spark/sql/hive/HiveContext.scala
Loading
Please register or sign in to comment