HyukjinKwon commented on a change in pull request #23470: [SPARK-26549][PySpark] Fix for python worker reuse take no effect for parallelize xrange URL: https://github.com/apache/spark/pull/23470#discussion_r246101542
########## 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: nit; I would name the variables `previous_pids` and `current_pids`. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org