We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7851ea5 commit 93a2b08Copy full SHA for 93a2b08
python/pyspark/shell.py
@@ -30,6 +30,7 @@
30
import pyspark
31
from pyspark.context import SparkContext
32
from pyspark.sql import SparkSession, SQLContext
33
+from pyspark.sql.snappy import SnappyContext
34
from pyspark.storagelevel import StorageLevel
35
36
if os.environ.get("SPARK_EXECUTOR_URI"):
@@ -38,6 +39,8 @@
38
39
SparkContext._ensure_initialized()
40
41
try:
42
+ sqlContext = SnappyContext(sc)
43
+except py4j.protocol.Py4JError:
44
# Try to access HiveConf, it will raise exception if Hive is not added
45
SparkContext._jvm.org.apache.hadoop.hive.conf.HiveConf()
46
spark = SparkSession.builder\
0 commit comments