ExceptionTraceback (most recent call last)
<ipython-input-1-74840fd57422> in <module>()
5 from pyspark.sql import SparkSession
6
----> 7 spark = SparkSession.builder.appName("PythonPi").getOrCreate()
8
9 #partitions = int(sys.argv[1]) if len(sys.argv) > 1 else 2
/root/spark-2.0.1-bin-fluxcapacitor/python/pyspark/sql/session.py in getOrCreate(self)
164 session = SparkSession._instantiatedContext
165 if session is None:
--> 166 sparkConf = SparkConf()
167 for key, value in self._options.items():
168 sparkConf.set(key, value)
/root/spark-2.0.1-bin-fluxcapacitor/python/pyspark/conf.py in __init__(self, loadDefaults, _jvm, _jconf)
102 else:
103 from pyspark.context import SparkContext
--> 104 SparkContext._ensure_initialized()
105 _jvm = _jvm or SparkContext._jvm
106 self._jconf = _jvm.SparkConf(loadDefaults)
/root/spark-2.0.1-bin-fluxcapacitor/python/pyspark/context.py in _ensure_initialized(cls, instance, gateway)
241 with SparkContext._lock:
242 if not SparkContext._gateway:
--> 243 SparkContext._gateway = gateway or launch_gateway()
244 SparkContext._jvm = SparkContext._gateway.jvm
245
/root/spark-2.0.1-bin-fluxcapacitor/python/pyspark/java_gateway.py in launch_gateway()
92 callback_socket.close()
93 if gateway_port is None:
---> 94 raise Exception("Java gateway process exited before sending the driver its port number")
95
96 # In Windows, ensure the Java child processes do not linger after Python has exited.
Exception: Java gateway process exited before sending the driver its port number