diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/programming-guide.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/programming-guide.md b/docs/programming-guide.md index 7989e02dfb..79784682bf 100644 --- a/docs/programming-guide.md +++ b/docs/programming-guide.md @@ -891,6 +891,10 @@ for details. <td> When called on a dataset of (K, V) pairs, returns a dataset of (K, V) pairs where the values for each key are aggregated using the given reduce function. Like in <code>groupByKey</code>, the number of reduce tasks is configurable through an optional second argument. </td> </tr> <tr> + <td> <b>aggregateByKey</b>(<i>zeroValue</i>)(<i>seqOp</i>, <i>combOp</i>, [<i>numTasks</i>]) </td> + <td> When called on a dataset of (K, V) pairs, returns a dataset of (K, U) pairs where the values for each key are aggregated using the given combine functions and a neutral "zero" value. Allows an aggregated value type that is different than the input value type, while avoiding unnecessary allocations. Like in <code>groupByKey</code>, the number of reduce tasks is configurable through an optional second argument. </td> +</tr> +<tr> <td> <b>sortByKey</b>([<i>ascending</i>], [<i>numTasks</i>]) </td> <td> When called on a dataset of (K, V) pairs where K implements Ordered, returns a dataset of (K, V) pairs sorted by keys in ascending or descending order, as specified in the boolean <code>ascending</code> argument.</td> </tr> |