T - The type of the elements of the sorted and grouped DataSet.@Deprecated @Public public class SortedGrouping<T> extends Grouping<T>
The following transformation can be applied on sorted groups:
customPartitioner, inputDataSet, keys| 构造器和说明 |
|---|
SortedGrouping(DataSet<T> set,
org.apache.flink.api.common.operators.Keys<T> keys,
int field,
org.apache.flink.api.common.operators.Order order)
已过时。
|
SortedGrouping(DataSet<T> set,
org.apache.flink.api.common.operators.Keys<T> keys,
org.apache.flink.api.common.operators.Keys.SelectorFunctionKeys<T,K> keySelector,
org.apache.flink.api.common.operators.Order order)
已过时。
|
SortedGrouping(DataSet<T> set,
org.apache.flink.api.common.operators.Keys<T> keys,
String field,
org.apache.flink.api.common.operators.Order order)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
<R> GroupCombineOperator<T,R> |
combineGroup(org.apache.flink.api.common.functions.GroupCombineFunction<T,R> combiner)
已过时。
Applies a GroupCombineFunction on a grouped
DataSet. |
GroupReduceOperator<T,T> |
first(int n)
已过时。
Returns a new set containing the first n elements in this grouped and sorted
DataSet. |
protected org.apache.flink.api.common.operators.Ordering |
getGroupOrdering()
已过时。
|
protected int[] |
getGroupSortKeyPositions()
已过时。
|
protected org.apache.flink.api.common.operators.Order[] |
getGroupSortOrders()
已过时。
|
protected org.apache.flink.api.common.operators.Keys.SelectorFunctionKeys<T,?> |
getSortSelectionFunctionKey()
已过时。
|
<R> GroupReduceOperator<T,R> |
reduceGroup(org.apache.flink.api.common.functions.GroupReduceFunction<T,R> reducer)
已过时。
Applies a GroupReduce transformation on a grouped and sorted
DataSet. |
SortedGrouping<T> |
sortGroup(int field,
org.apache.flink.api.common.operators.Order order)
已过时。
Sorts
Tuple elements within a group on the specified
field in the specified Order. |
SortedGrouping<T> |
sortGroup(String field,
org.apache.flink.api.common.operators.Order order)
已过时。
Sorts
Tuple or POJO elements within a group on the
specified field in the specified Order. |
SortedGrouping<T> |
withPartitioner(org.apache.flink.api.common.functions.Partitioner<?> partitioner)
已过时。
Uses a custom partitioner for the grouping.
|
getCustomPartitioner, getInputDataSet, getKeyspublic SortedGrouping(DataSet<T> set, org.apache.flink.api.common.operators.Keys<T> keys, int field, org.apache.flink.api.common.operators.Order order)
public SortedGrouping(DataSet<T> set, org.apache.flink.api.common.operators.Keys<T> keys, String field, org.apache.flink.api.common.operators.Order order)
protected int[] getGroupSortKeyPositions()
protected org.apache.flink.api.common.operators.Order[] getGroupSortOrders()
protected org.apache.flink.api.common.operators.Ordering getGroupOrdering()
public SortedGrouping<T> withPartitioner(org.apache.flink.api.common.functions.Partitioner<?> partitioner)
partitioner - The custom partitioner.protected org.apache.flink.api.common.operators.Keys.SelectorFunctionKeys<T,?> getSortSelectionFunctionKey()
public <R> GroupReduceOperator<T,R> reduceGroup(org.apache.flink.api.common.functions.GroupReduceFunction<T,R> reducer)
DataSet.
The transformation calls a 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 <R> GroupCombineOperator<T,R> combineGroup(org.apache.flink.api.common.functions.GroupCombineFunction<T,R> combiner)
DataSet. A CombineFunction is similar to
a GroupReduceFunction but does not perform a full data exchange. Instead, the CombineFunction
calls the combine method once per partition for combining a group of results. This operator
is suitable for combining values into an intermediate format before doing a proper
groupReduce where the data is shuffled across the node for further reduction. The GroupReduce
operator can also be supplied with a combiner by implementing the RichGroupReduce function.
The combine method of the RichGroupReduce function demands input and output type to be the
same. The CombineFunction, on the other side, can have an arbitrary output type.combiner - The GroupCombineFunction that is applied on the DataSet.public GroupReduceOperator<T,T> first(int n)
DataSet.n - The desired number of elements for each group.public SortedGrouping<T> sortGroup(int field, org.apache.flink.api.common.operators.Order order)
Tuple elements within a group on the specified
field in the specified Order.
Note: Only groups of Tuple or Pojo elements can be sorted.
Groups can be sorted by multiple fields by chaining sortGroup(int, Order) calls.
field - The Tuple field on which the group is sorted.order - The Order in which the specified Tuple field is sorted.Tuple,
Orderpublic SortedGrouping<T> sortGroup(String field, org.apache.flink.api.common.operators.Order order)
Tuple or POJO elements within a group on the
specified field in the specified Order.
Note: Only groups of Tuple or Pojo elements can be sorted.
Groups can be sorted by multiple fields by chaining sortGroup(String, Order)
calls.
field - The Tuple or Pojo field on which the group is sorted.order - The Order in which the specified field is sorted.Tuple,
OrderCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.