aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/shell.py
diff options
context:
space:
mode:
authorSandeep Singh <sandeep@techaddict.me>2016-05-11 17:44:00 -0700
committerAndrew Or <andrew@databricks.com>2016-05-11 17:44:00 -0700
commitdb573fc743d12446dd0421fb45d00c2f541eaf9a (patch)
treedbd694d63616becab4f45b8abdd0b583921cc3a5 /python/pyspark/shell.py
parent603f4453a16825cc5773cfe24d6ae4cee5ec949a (diff)
downloadspark-db573fc743d12446dd0421fb45d00c2f541eaf9a.tar.gz
spark-db573fc743d12446dd0421fb45d00c2f541eaf9a.tar.bz2
spark-db573fc743d12446dd0421fb45d00c2f541eaf9a.zip
[SPARK-15072][SQL][PYSPARK] FollowUp: Remove SparkSession.withHiveSupport in PySpark
## What changes were proposed in this pull request? This is a followup of https://github.com/apache/spark/pull/12851 Remove `SparkSession.withHiveSupport` in PySpark and instead use `SparkSession.builder. enableHiveSupport` ## How was this patch tested? Existing tests. Author: Sandeep Singh <sandeep@techaddict.me> Closes #13063 from techaddict/SPARK-15072-followup.
Diffstat (limited to 'python/pyspark/shell.py')
-rw-r--r--python/pyspark/shell.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/pyspark/shell.py b/python/pyspark/shell.py
index c6b0eda996..adaa3b5a79 100644
--- a/python/pyspark/shell.py
+++ b/python/pyspark/shell.py
@@ -41,7 +41,9 @@ atexit.register(lambda: sc.stop())
try:
# Try to access HiveConf, it will raise exception if Hive is not added
sc._jvm.org.apache.hadoop.hive.conf.HiveConf()
- spark = SparkSession.withHiveSupport(sc)
+ spark = SparkSession.builder\
+ .enableHiveSupport()\
+ .getOrCreate()
except py4j.protocol.Py4JError:
spark = SparkSession(sc)
except TypeError: