Skip to content

Commit

Permalink
SPARK-1728. JavaRDDLike.mapPartitionsWithIndex requires ClassTag
Browse files Browse the repository at this point in the history
  • Loading branch information
sryza committed May 6, 2014
1 parent e97a2e6 commit 4751443
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 4751443

Please sign in to comment.