Skip to content
Snippets Groups Projects
Commit 4a74e863 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Merge pull request #228 from rxin/dev

Added mapPartitionsWithSplit to the programming guide.
parents 143ef4f9 f5812d03
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,12 @@ The following tables list the transformations and actions currently supported (s
<td> Similar to map, but runs separately on each partition (block) of the RDD, so <i>func</i> must be of type
Iterator[T] => Iterator[U] when running on an RDD of type T. </td>
</tr>
<tr>
<td> <b>mapPartitionsWithSplit</b>(<i>func</i>) </td>
<td> Similar to mapPartitions, but also provides <i>func</i> with an integer value representing the index of
the split, so <i>func</i> must be of type (Int, Iterator[T]) => Iterator[U] when running on an RDD of type T.
</td>
</tr>
<tr>
<td> <b>sample</b>(<i>withReplacement</i>, <i>fraction</i>, <i>seed</i>) </td>
<td> Sample a fraction <i>fraction</i> of the data, with or without replacement, using a given random number generator seed. </td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment