Skip to content

Instantly share code, notes, and snippets.

@cerisier
Last active April 10, 2016 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cerisier/4ed21c359d84035765b2980bc1855522 to your computer and use it in GitHub Desktop.
Save cerisier/4ed21c359d84035765b2980bc1855522 to your computer and use it in GitHub Desktop.
/**
* An RDD that applies the provided function to every partition of the parent RDD.
*/
private[spark] class MapPartitionsRDD[U: ClassTag, T: ClassTag](
var prev: RDD[T],
f: (TaskContext, Int, Iterator[T]) => Iterator[U], // (TaskContext, partition index, iterator)
preservesPartitioning: Boolean = false)
extends RDD[U](prev) {
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment