Skip to content

Commit

Permalink
SPARK-1728. JavaRDDLike.mapPartitionsWithIndex requires ClassTag
Browse files Browse the repository at this point in the history
Author: Sandy Ryza <[email protected]>

Closes #657 from sryza/sandy-spark-1728 and squashes the following commits:

4751443 [Sandy Ryza] SPARK-1728. JavaRDDLike.mapPartitionsWithIndex requires ClassTag
(cherry picked from commit 8e724dc)

Signed-off-by: Patrick Wendell <[email protected]>
  • Loading branch information
sryza authored and pwendell committed May 6, 2014
1 parent 4d0dd50 commit 01e3ff0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] extends Serializable {
* Return a new RDD by applying a function to each partition of this RDD, while tracking the index
* of the original partition.
*/
def mapPartitionsWithIndex[R: ClassTag](
def mapPartitionsWithIndex[R](
f: JFunction2[java.lang.Integer, java.util.Iterator[T], java.util.Iterator[R]],
preservesPartitioning: Boolean = false): JavaRDD[R] =
new JavaRDD(rdd.mapPartitionsWithIndex(((a,b) => f(a,asJavaIterator(b))),
preservesPartitioning))
preservesPartitioning)(fakeClassTag))(fakeClassTag)

/**
* Return a new RDD by applying a function to all elements of this RDD.
Expand Down

0 comments on commit 01e3ff0

Please sign in to comment.