diff options
Diffstat (limited to 'python/pyspark/shell.py')
-rw-r--r-- | python/pyspark/shell.py | 4 |
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: |