You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/05 13:29:37 UTC

[GitHub] [spark] srowen commented on a change in pull request #23954: [SPARK-27041][PySpark] Use imap() for python 2.x to resolve oom issue

srowen commented on a change in pull request #23954: [SPARK-27041][PySpark] Use imap() for python 2.x to resolve oom issue
URL: https://github.com/apache/spark/pull/23954#discussion_r262496122
 
 

 ##########
 File path: python/pyspark/worker.py
 ##########
 @@ -45,6 +45,8 @@
 
 if sys.version >= '3':
     basestring = str
+else:
+    from itertools import imap as map  # use iterator map by default
 
 Review comment:
   Hm, that's a good point. I don't know enough Python to be sure. @holdenk do you know how Python would work in this regard? Is it safer to push this check to the one site below and call one or the other map function? it looks like itertools doesn't have imap in Python 3.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org