Skip to content

Commit 54b5358

Browse files
Ken Takagiwagiwa
authored andcommitted
tried to restart callback server
1 parent 4f07163 commit 54b5358

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

python/pyspark/java_gateway.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ def run(self):
102102
EchoOutputThread(proc.stdout).start()
103103

104104
# Connect to the gateway
105-
gateway = JavaGateway(GatewayClient(port=gateway_port), auto_convert=False, start_callback_server=True)
105+
# If start_callback_server is True, it looks like callback server is not killed
106+
# process is hang up and test case does not move forward.
107+
#gateway = JavaGateway(GatewayClient(port=gateway_port), auto_convert=False, start_callback_server=True)
108+
gateway = JavaGateway(GatewayClient(port=gateway_port), auto_convert=False, start_callback_server=False)
106109

107110
# Import the classes used by PySpark
108111
java_import(gateway.jvm, "org.apache.spark.SparkConf")

python/pyspark/streaming/context.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
import sys
1919
from signal import signal, SIGTERM, SIGINT
2020

21+
import time
22+
23+
from pyspark.conf import SparkConf
24+
from pyspark.files import SparkFiles
25+
from pyspark.java_gateway import launch_gateway
2126
from pyspark.serializers import PickleSerializer, BatchedSerializer, UTF8Deserializer
2227
from pyspark.context import SparkContext
2328
from pyspark.streaming.dstream import DStream

0 commit comments

Comments
 (0)