spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mateiz <...@git.apache.org>
Subject [GitHub] spark pull request: SPARK-2978. Transformation with MR shuffle sem...
Date Fri, 05 Sep 2014 22:01:21 GMT
Github user mateiz commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2274#discussion_r17200864
  
    --- Diff: python/pyspark/rdd.py ---
    @@ -515,6 +515,30 @@ def __add__(self, other):
                 raise TypeError
             return self.union(other)
     
    +    def repartitionAndSortWithinPartitions(self, numPartitions=None, partitionFunc=portable_hash,
    +                                           ascending=True, keyfunc=lambda x: x):
    +        """
    +        Repartition the RDD according to the given partitioner and, within each resulting
partition,
    +        sort records by their keys.
    +
    +        >>> rdd = sc.parallelize([(0, 5), (3, 8), (2, 6), (0, 8), (3, 8), (1,
3)])
    +        >>> rdd2 = rdd.repartitionAndSortWithinPartitions(True, lambda x: x
% 2, 2)
    --- End diff --
    
    Is this code actually correct? It seems to be passing arguments 3 and 4 of the function,
but in positions 1 and 2.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message