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 87a3b06 commit 67a8f42Copy full SHA for 67a8f42
python/pyspark/java_gateway.py
@@ -104,9 +104,16 @@ def preexec_func():
104
proc = Popen(command, **popen_kwargs)
105
106
# Wait for the file to appear, or for the process to exit, whichever happens first.
107
- while not proc.poll() and not os.path.isfile(conn_info_file):
+ while proc.poll() is None and not os.path.isfile(conn_info_file):
108
time.sleep(0.1)
109
110
+ return_code = proc.poll()
111
+ if return_code is not None and return_code != 0:
112
+ raise PySparkRuntimeError(
113
+ errorClass="JAVA_GATEWAY_EXITED",
114
+ messageParameters={"command": " ".join(command), "return_code": return_code},
115
+ )
116
+
117
if not os.path.isfile(conn_info_file):
118
raise PySparkRuntimeError(
119
errorClass="JAVA_GATEWAY_EXITED",
0 commit comments