Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1977#discussion_r17678700
  
    --- Diff: python/pyspark/rdd.py ---
    @@ -1562,21 +1560,34 @@ def createZero():
     
             return self.combineByKey(lambda v: func(createZero(), v), func, 
func, numPartitions)
     
    +    def _can_spill(self):
    +        return self.ctx._conf.get("spark.shuffle.spill", "True").lower() 
== "true"
    +
    +    def _memory_limit(self):
    +        return 
_parse_memory(self.ctx._conf.get("spark.python.worker.memory", "512m"))
    +
         # TODO: support variant with custom partitioner
         def groupByKey(self, numPartitions=None):
             """
             Group the values for each key in the RDD into a single sequence.
    -        Hash-partitions the resulting RDD with into numPartitions 
partitions.
    +        Hash-partitions the resulting RDD with into numPartitions
    +        partitions.
    +
    +        The values in the resulting RDD is iterable object 
L{ResultIterable},
    +        they can be iterated only once. The `len(values)` will result in
    --- End diff --
    
    This is a change from the old behavior.  Based on our discussion, I guess 
that we only return a ResultIterable in cases where we spill and still return a 
list in the non-spilling cases? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to