diff options
author | Herman van Hovell <hvanhovell@databricks.com> | 2017-03-28 10:07:24 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2017-03-28 10:07:24 +0800 |
commit | ea361165e1ddce4d8aa0242ae3e878d7b39f1de2 (patch) | |
tree | f3014ba709d54b48172a399708074480a6ed9661 /.gitignore | |
parent | 8a6f33f0483dcee81467e6374a796b5dbd53ea30 (diff) | |
download | spark-ea361165e1ddce4d8aa0242ae3e878d7b39f1de2.tar.gz spark-ea361165e1ddce4d8aa0242ae3e878d7b39f1de2.tar.bz2 spark-ea361165e1ddce4d8aa0242ae3e878d7b39f1de2.zip |
[SPARK-20100][SQL] Refactor SessionState initialization
## What changes were proposed in this pull request?
The current SessionState initialization code path is quite complex. A part of the creation is done in the SessionState companion objects, a part of the creation is one inside the SessionState class, and a part is done by passing functions.
This PR refactors this code path, and consolidates SessionState initialization into a builder class. This SessionState will not do any initialization and just becomes a place holder for the various Spark SQL internals. This also lays the ground work for two future improvements:
1. This provides us with a start for removing the `HiveSessionState`. Removing the `HiveSessionState` would also require us to move resource loading into a separate class, and to (re)move metadata hive.
2. This makes it easier to customize the Spark Session. Currently you will need to create a custom version of the builder. I have added hooks to facilitate this. A future step will be to create a semi stable API on top of this.
## How was this patch tested?
Existing tests.
Author: Herman van Hovell <hvanhovell@databricks.com>
Closes #17433 from hvanhovell/SPARK-20100.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions