Class GroupReduceOperatorBase<IN,OUT,FT extends GroupReduceFunction<IN,OUT>>
- java.lang.Object
-
- org.apache.flink.api.common.operators.Operator<OUT>
-
- org.apache.flink.api.common.operators.AbstractUdfOperator<OUT,FT>
-
- org.apache.flink.api.common.operators.SingleInputOperator<IN,OUT,FT>
-
- org.apache.flink.api.common.operators.base.GroupReduceOperatorBase<IN,OUT,FT>
-
@Internal public class GroupReduceOperatorBase<IN,OUT,FT extends GroupReduceFunction<IN,OUT>> extends SingleInputOperator<IN,OUT,FT>
- See Also:
GroupReduceFunction
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.common.operators.SingleInputOperator
input
-
Fields inherited from class org.apache.flink.api.common.operators.AbstractUdfOperator
broadcastInputs, userFunction
-
Fields inherited from class org.apache.flink.api.common.operators.Operator
compilerHints, name, operatorInfo, parameters
-
-
Constructor Summary
Constructors Constructor Description GroupReduceOperatorBase(FT udf, UnaryOperatorInformation<IN,OUT> operatorInfo, int[] keyPositions, String name)GroupReduceOperatorBase(FT udf, UnaryOperatorInformation<IN,OUT> operatorInfo, String name)GroupReduceOperatorBase(Class<? extends FT> udf, UnaryOperatorInformation<IN,OUT> operatorInfo, int[] keyPositions, String name)GroupReduceOperatorBase(Class<? extends FT> udf, UnaryOperatorInformation<IN,OUT> operatorInfo, String name)GroupReduceOperatorBase(UserCodeWrapper<FT> udf, UnaryOperatorInformation<IN,OUT> operatorInfo, int[] keyPositions, String name)GroupReduceOperatorBase(UserCodeWrapper<FT> udf, UnaryOperatorInformation<IN,OUT> operatorInfo, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<OUT>executeOnCollections(List<IN> inputData, RuntimeContext ctx, ExecutionConfig executionConfig)Partitioner<?>getCustomPartitioner()OrderinggetGroupOrder()Gets the order of elements within a reduce group.booleanisCombinable()Checks whether the operation is combinable.voidsetCombinable(boolean combinable)Marks the group reduce operation as combinable.voidsetCustomPartitioner(Partitioner<?> customPartitioner)voidsetGroupOrder(Ordering order)Sets the order of the elements within a reduce group.-
Methods inherited from class org.apache.flink.api.common.operators.SingleInputOperator
accept, addInput, addInput, clearInputs, getInput, getKeyColumns, getNumberOfInputs, getOperatorInfo, getSemanticProperties, setInput, setInput, setInputs, setSemanticProperties
-
Methods inherited from class org.apache.flink.api.common.operators.AbstractUdfOperator
asArray, emptyClassArray, getBroadcastInputs, getUserCodeWrapper, setBroadcastVariable, setBroadcastVariables
-
Methods inherited from class org.apache.flink.api.common.operators.Operator
createUnionCascade, createUnionCascade, createUnionCascade, getCompilerHints, getMinResources, getName, getParallelism, getParameters, getPreferredResources, setName, setParallelism, setParameter, setParameter, setParameter, setResources, toString
-
-
-
-
Constructor Detail
-
GroupReduceOperatorBase
public GroupReduceOperatorBase(UserCodeWrapper<FT> udf, UnaryOperatorInformation<IN,OUT> operatorInfo, int[] keyPositions, String name)
-
GroupReduceOperatorBase
public GroupReduceOperatorBase(FT udf, UnaryOperatorInformation<IN,OUT> operatorInfo, int[] keyPositions, String name)
-
GroupReduceOperatorBase
public GroupReduceOperatorBase(Class<? extends FT> udf, UnaryOperatorInformation<IN,OUT> operatorInfo, int[] keyPositions, String name)
-
GroupReduceOperatorBase
public GroupReduceOperatorBase(UserCodeWrapper<FT> udf, UnaryOperatorInformation<IN,OUT> operatorInfo, String name)
-
GroupReduceOperatorBase
public GroupReduceOperatorBase(FT udf, UnaryOperatorInformation<IN,OUT> operatorInfo, String name)
-
-
Method Detail
-
setGroupOrder
public void setGroupOrder(Ordering order)
Sets the order of the elements within a reduce group.- Parameters:
order- The order for the elements in a reduce group.
-
getGroupOrder
public Ordering getGroupOrder()
Gets the order of elements within a reduce group. If no such order has been set, this method returns null.- Returns:
- The secondary order.
-
setCombinable
public void setCombinable(boolean combinable)
Marks the group reduce operation as combinable. Combinable operations may pre-reduce the data before the actual group reduce operations. Combinable user-defined functions must implement the interfaceGroupCombineFunction.- Parameters:
combinable- Flag to mark the group reduce operation as combinable.
-
isCombinable
public boolean isCombinable()
Checks whether the operation is combinable.- Returns:
- True, if the UDF is combinable, false if not.
- See Also:
setCombinable(boolean)
-
setCustomPartitioner
public void setCustomPartitioner(Partitioner<?> customPartitioner)
-
getCustomPartitioner
public Partitioner<?> getCustomPartitioner()
-
executeOnCollections
protected List<OUT> executeOnCollections(List<IN> inputData, RuntimeContext ctx, ExecutionConfig executionConfig) throws Exception
- Specified by:
executeOnCollectionsin classSingleInputOperator<IN,OUT,FT extends GroupReduceFunction<IN,OUT>>- Throws:
Exception
-
-