xuanyuanking commented on a change in pull request #23470: 
[SPARK-26549][PySpark] Fix for python worker reuse take no effect for 
parallelize lazy iterable range
URL: https://github.com/apache/spark/pull/23470#discussion_r246248499
 
 

 ##########
 File path: python/pyspark/tests/test_worker.py
 ##########
 @@ -144,6 +144,15 @@ def test_with_different_versions_of_python(self):
         finally:
             self.sc.pythonVer = version
 
+    def test_reuse_worker_of_parallelize_xrange(self):
+        def get_worker_pid(input_rdd):
+            return input_rdd.map(lambda x: os.getpid()).collect()
+        rdd = self.sc.parallelize(xrange(20), 20)
+        worker_pids = get_worker_pid(rdd)
 
 Review comment:
   Thanks, done in 4868e82.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to