Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,7 @@ def process(df_id, batch_id): # type: ignore[no-untyped-def]
sock.settimeout(None)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@ def process(listener_event_str, listener_event_type): # type: ignore[no-untyped
sock.settimeout(None)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,7 @@ def main(infile: IO, outfile: IO) -> None:
sock.settimeout(None)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,7 @@ def process(
(sock_file, sock) = local_connect_and_auth(java_port, auth_secret)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/sql/worker/analyze_udtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,7 @@ def invalid_analyze_result_field(field_name: str, expected_field: str) -> PySpar
# TODO: Remove the following two lines and use `Process.pid()` when we drop JDK 8.
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/sql/worker/commit_data_source_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,7 @@ def main(infile: IO, outfile: IO) -> None:
(sock_file, _) = local_connect_and_auth(java_port, auth_secret)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/sql/worker/create_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,7 @@ def main(infile: IO, outfile: IO) -> None:
(sock_file, _) = local_connect_and_auth(java_port, auth_secret)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/sql/worker/lookup_data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,7 @@ def main(infile: IO, outfile: IO) -> None:
(sock_file, _) = local_connect_and_auth(java_port, auth_secret)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/sql/worker/plan_data_source_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,4 +382,7 @@ def data_source_read_func(iterator: Iterable[pa.RecordBatch]) -> Iterable[pa.Rec
(sock_file, _) = local_connect_and_auth(java_port, auth_secret)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/sql/worker/python_streaming_sink_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@ def main(infile: IO, outfile: IO) -> None:
(sock_file, _) = local_connect_and_auth(java_port, auth_secret)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/sql/worker/write_into_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,7 @@ def batch_to_rows() -> Iterator[Row]:
(sock_file, _) = local_connect_and_auth(java_port, auth_secret)
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()
5 changes: 4 additions & 1 deletion python/pyspark/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2081,4 +2081,7 @@ def process():
# TODO: Remove the following two lines and use `Process.pid()` when we drop JDK 8.
write_int(os.getpid(), sock_file)
sock_file.flush()
main(sock_file, sock_file)
try:
main(sock_file, sock_file)
finally:
sock_file.close()