2017-11-08 4 views
2

를 보내기 전에 종료되고 난 그냥 명령PySpark 파이썬 오류 : 예외 : 자바 게이트웨이 프로세스 내가 파이썬 3 PySpark을 사용하고있는 드라이버에게 포트 번호

conda install pyspark 

으로 pyspark를 다운로드하고 성공적으로 다운로드, 내가 가져온 나는 다음과 같은 예외

Exception         Traceback (most recent call last) 
<ipython-input-9-a4daca8dcb9d> in <module>() 
----> 1 sc1 = sp.SparkContext.getOrCreate() 

~\Anaconda3\lib\site-packages\pyspark\context.py in getOrCreate(cls, conf) 
    332   with SparkContext._lock: 
    333    if SparkContext._active_spark_context is None: 
--> 334     SparkContext(conf=conf or SparkConf()) 
    335    return SparkContext._active_spark_context 
    336 

~\Anaconda3\lib\site-packages\pyspark\context.py in __init__(self, master, appName, sparkHome, pyFiles, environment, batchSize, serializer, conf, gateway, jsc, profiler_cls) 
    113   """ 
    114   self._callsite = first_spark_call() or CallSite(None, None, None) 
--> 115   SparkContext._ensure_initialized(self, gateway=gateway, conf=conf) 
    116   try: 
    117    self._do_init(master, appName, sparkHome, pyFiles, environment, batchSize, serializer, 

~\Anaconda3\lib\site-packages\pyspark\context.py in _ensure_initialized(cls, instance, gateway, conf) 
    281   with SparkContext._lock: 
    282    if not SparkContext._gateway: 
--> 283     SparkContext._gateway = gateway or launch_gateway(conf) 
    284     SparkContext._jvm = SparkContext._gateway.jvm 
    285 

~\Anaconda3\lib\site-packages\pyspark\java_gateway.py in launch_gateway(conf) 
    93     callback_socket.close() 
    94   if gateway_port is None: 
---> 95    raise Exception("Java gateway process exited before sending the driver its port number") 
    96 
    97   # 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 
을 얻고 다음 코드

sc1 = sp.SparkContext.getOrCreate() 

를 실행하려고 다음 Jupyter Notebook에 제출하고

몇 가지 해결책을 시도했지만 그 중 아무 것도 작동하지 않았습니다. 제안 사항 ??

+0

Windows 용 솔루션을 얻었습니다. https://medium.com/@GalarnykMichael/install-spark-on-windows-pyspark-4498a5d8d66c이 링크의 지침을 따르면 모든 것이 올바르게 작동합니다. – id101112

답변

-1

해결책은 Windows 사용자의 경우 Solution입니다. 설치 방법, 단계별 지침, 단계별 지침에 따라 진행되었으며,이 기능을 사용해보십시오.