You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-17245][SQL][BRANCH-1.6] Do not rely on Hive's session state to retrieve HiveConf
## What changes were proposed in this pull request?
Right now, we rely on Hive's `SessionState.get()` to retrieve the HiveConf used by ClientWrapper. However, this conf is actually the HiveConf set with the `state`. There is a small chance that we are trying to use the Hive client in a new thread while the global client has not been created yet. In this case, `SessionState.get()` will return a `null`, which causes a NPE when we call `SessionState.get(). getConf `. Since the conf that we want is actually the conf we set to `state`. I am changing the code to just call `state.getConf` (this is also what Spark 2.0 does).
## How was this patch tested?
I have not figured out a good way to reproduce this.
Author: Yin Huai <yhuai@databricks.com>
Closesapache#14816 from yhuai/SPARK-17245.
(cherry picked from commit 047bc3f)
0 commit comments