Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Java API
  • Loading branch information
holdenk committed Apr 8, 2014
commit a5cd2fa619254e0ca5af7aa333317cd65221c1a0
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.spark.api.java

import java.util.{Comparator, List => JList}
import java.util.{Comparator, List => JList, Iterator => JIterator}

import scala.collection.JavaConversions._
import scala.reflect.ClassTag
Expand Down Expand Up @@ -72,7 +72,7 @@ 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](f: MapPartitionsWithIndexFunction[T, R],
def mapPartitionsWithIndex[R: ClassTag](f: JFunction2[Integer, JIterator[T], JIterator[R]],
preservesPartitioning: Boolean = false): JavaRDD[R] = {
import scala.collection.JavaConverters._
def fn = (a: Int, b: Iterator[T]) => f.call(a, asJavaIterator(b)).asScala
Expand Down