T - The type (parameters and return type) of the reduce function.FT - The type of the reduce function.@Internal public class ReduceOperatorBase<T,FT extends ReduceFunction<T>> extends SingleInputOperator<T,T,FT>
ReduceFunction| Modifier and Type | Class and Description |
|---|---|
static class |
ReduceOperatorBase.CombineHint
An enumeration of hints, optionally usable to tell the system exactly how to execute the combiner phase
of a reduce.
|
inputbroadcastInputs, userFunctioncompilerHints, name, operatorInfo, parameters| Constructor and Description |
|---|
ReduceOperatorBase(Class<? extends FT> udf,
UnaryOperatorInformation<T,T> operatorInfo,
int[] keyPositions,
String name)
Creates a grouped reduce data flow operator.
|
ReduceOperatorBase(Class<? extends FT> udf,
UnaryOperatorInformation<T,T> operatorInfo,
String name)
Creates a non-grouped reduce data flow operator (all-reduce).
|
ReduceOperatorBase(FT udf,
UnaryOperatorInformation<T,T> operatorInfo,
int[] keyPositions,
String name)
Creates a grouped reduce data flow operator.
|
ReduceOperatorBase(FT udf,
UnaryOperatorInformation<T,T> operatorInfo,
String name)
Creates a non-grouped reduce data flow operator (all-reduce).
|
ReduceOperatorBase(UserCodeWrapper<FT> udf,
UnaryOperatorInformation<T,T> operatorInfo,
int[] keyPositions,
String name)
Creates a grouped reduce data flow operator.
|
ReduceOperatorBase(UserCodeWrapper<FT> udf,
UnaryOperatorInformation<T,T> operatorInfo,
String name)
Creates a non-grouped reduce data flow operator (all-reduce).
|
| Modifier and Type | Method and Description |
|---|---|
protected List<T> |
executeOnCollections(List<T> inputData,
RuntimeContext ctx,
ExecutionConfig executionConfig) |
ReduceOperatorBase.CombineHint |
getCombineHint() |
Partitioner<?> |
getCustomPartitioner() |
void |
setCombineHint(ReduceOperatorBase.CombineHint hint) |
void |
setCustomPartitioner(Partitioner<?> customPartitioner) |
accept, addInput, addInput, clearInputs, getInput, getKeyColumns, getNumberOfInputs, getOperatorInfo, getSemanticProperties, setInput, setInput, setInputs, setSemanticPropertiesasArray, emptyClassArray, getBroadcastInputs, getUserCodeWrapper, setBroadcastVariable, setBroadcastVariablescreateUnionCascade, createUnionCascade, createUnionCascade, getCompilerHints, getMinResources, getName, getParallelism, getParameters, getPreferredResources, setName, setParallelism, setParameter, setParameter, setParameter, setResources, toStringpublic ReduceOperatorBase(UserCodeWrapper<FT> udf, UnaryOperatorInformation<T,T> operatorInfo, int[] keyPositions, String name)
udf - The user-defined function, contained in the UserCodeWrapper.operatorInfo - The type information, describing input and output types of the reduce function.keyPositions - The positions of the key fields, in the common data model (flattened).name - The name of the operator (for logging and messages).public ReduceOperatorBase(FT udf, UnaryOperatorInformation<T,T> operatorInfo, int[] keyPositions, String name)
udf - The user-defined function, as a function object.operatorInfo - The type information, describing input and output types of the reduce function.keyPositions - The positions of the key fields, in the common data model (flattened).name - The name of the operator (for logging and messages).public ReduceOperatorBase(Class<? extends FT> udf, UnaryOperatorInformation<T,T> operatorInfo, int[] keyPositions, String name)
udf - The class representing the parameterless user-defined function.operatorInfo - The type information, describing input and output types of the reduce function.keyPositions - The positions of the key fields, in the common data model (flattened).name - The name of the operator (for logging and messages).public ReduceOperatorBase(UserCodeWrapper<FT> udf, UnaryOperatorInformation<T,T> operatorInfo, String name)
udf - The user-defined function, contained in the UserCodeWrapper.operatorInfo - The type information, describing input and output types of the reduce function.name - The name of the operator (for logging and messages).public ReduceOperatorBase(FT udf, UnaryOperatorInformation<T,T> operatorInfo, String name)
udf - The user-defined function, as a function object.operatorInfo - The type information, describing input and output types of the reduce function.name - The name of the operator (for logging and messages).public ReduceOperatorBase(Class<? extends FT> udf, UnaryOperatorInformation<T,T> operatorInfo, String name)
udf - The class representing the parameterless user-defined function.operatorInfo - The type information, describing input and output types of the reduce function.name - The name of the operator (for logging and messages).public void setCustomPartitioner(Partitioner<?> customPartitioner)
public Partitioner<?> getCustomPartitioner()
protected List<T> executeOnCollections(List<T> inputData, RuntimeContext ctx, ExecutionConfig executionConfig) throws Exception
executeOnCollections in class SingleInputOperator<T,T,FT extends ReduceFunction<T>>Exceptionpublic void setCombineHint(ReduceOperatorBase.CombineHint hint)
public ReduceOperatorBase.CombineHint getCombineHint()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.