Skip to content

Commit 0fc12d7

Browse files
Documentation: add description for repartitionAndSortWithinPartitions
1 parent 15cacc8 commit 0fc12d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/programming-guide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,12 @@ for details.
934934
<td> Reshuffle the data in the RDD randomly to create either more or fewer partitions and balance it across them.
935935
This always shuffles all data over the network. </td>
936936
</tr>
937+
<tr>
938+
<td> <b>repartitionAndSortWithinPartitions</b>(<i>partitioner</i>) </td>
939+
<td> Repartition the RDD according to the given partitioner and, within each resulting partition,
940+
sort records by their keys. This is more efficient than calling <b>repartition</b> and then sorting within
941+
each partition because it can push the sorting down into the shuffle machinery. </td>
942+
</tr>
937943
</table>
938944

939945
### Actions

0 commit comments

Comments
 (0)