diff options
author | Sandy Ryza <sandy@cloudera.com> | 2014-05-05 18:26:34 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-05-05 18:26:34 -0700 |
commit | 8e724dcbad411c533e4f0cd053aa878e8a60694d (patch) | |
tree | 6a92ff1e091cec900ec325380090b52459930fd1 /core/src | |
parent | cf0a8f0204bb8acdaf441b03c924c278fef08e28 (diff) | |
download | spark-8e724dcbad411c533e4f0cd053aa878e8a60694d.tar.gz spark-8e724dcbad411c533e4f0cd053aa878e8a60694d.tar.bz2 spark-8e724dcbad411c533e4f0cd053aa878e8a60694d.zip |
SPARK-1728. JavaRDDLike.mapPartitionsWithIndex requires ClassTag
Author: Sandy Ryza <sandy@cloudera.com>
Closes #657 from sryza/sandy-spark-1728 and squashes the following commits:
4751443 [Sandy Ryza] SPARK-1728. JavaRDDLike.mapPartitionsWithIndex requires ClassTag
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala b/core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala index af06d1dca9..619bfd75be 100644 --- a/core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala +++ b/core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala @@ -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. |