BryanCutler commented on a change in pull request #24070: [SPARK-23961][PYTHON]
Fix error when toLocalIterator goes out of scope
URL: https://github.com/apache/spark/pull/24070#discussion_r264834502
##########
File path: python/pyspark/tests/test_rdd.py
##########
@@ -60,15 +60,12 @@ def test_sum(self):
self.assertEqual(6, self.sc.parallelize([1, 2, 3]).sum())
def test_to_localiterator(self):
- from time import sleep
rdd = self.sc.parallelize([1, 2, 3])
it = rdd.toLocalIterator()
- sleep(5)
Review comment:
This sleep is unnecessary. `rdd.toLocalIterator` makes the socket connection
and iterating starts reading from the pyspark serializer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]