T - The type of the elements of the sorted and grouped DataSet.public class SortedGrouping<T> extends Grouping<T>
| Constructor and Description |
|---|
SortedGrouping(DataSet<T> set,
Keys<T> keys,
int field,
Order order) |
| Modifier and Type | Method and Description |
|---|---|
protected int[] |
getGroupSortKeyPositions() |
protected Order[] |
getGroupSortOrders() |
<R> GroupReduceOperator<T,R> |
reduceGroup(GroupReduceFunction<T,R> reducer)
Applies a GroupReduce transformation on a grouped and sorted
DataSet.The transformation calls a RichGroupReduceFunction for each group of the DataSet. |
SortedGrouping<T> |
sortGroup(int field,
Order order)
Sorts
Tuple elements within a group on the specified field in the specified Order.
Note: Only groups of Tuple elements can be sorted.Groups can be sorted by multiple fields by chaining sortGroup(int, Order) calls. |
getDataSet, getKeysprotected int[] getGroupSortKeyPositions()
protected Order[] getGroupSortOrders()
public <R> GroupReduceOperator<T,R> reduceGroup(GroupReduceFunction<T,R> reducer)
DataSet.RichGroupReduceFunction for each group of the DataSet.
A GroupReduceFunction can iterate over all elements of a group and emit any
number of output elements including none.reducer - The GroupReduceFunction that is applied on each group of the DataSet.RichGroupReduceFunction,
GroupReduceOperator,
DataSetpublic SortedGrouping<T> sortGroup(int field, Order order)
Tuple elements within a group on the specified field in the specified Order.
Note: Only groups of Tuple elements can be sorted.sortGroup(int, Order) calls.Copyright © 2014 The Apache Software Foundation. All rights reserved.