Class ReduceOperatorBase<T,​FT extends org.apache.flink.api.common.functions.ReduceFunction<T>>

  • Type Parameters:
    T - The type (parameters and return type) of the reduce function.
    FT - The type of the reduce function.
    All Implemented Interfaces:
    Visitable<Operator<?>>

    @Internal
    public class ReduceOperatorBase<T,​FT extends org.apache.flink.api.common.functions.ReduceFunction<T>>
    extends SingleInputOperator<T,​T,​FT>
    Base data flow operator for Reduce user-defined functions. Accepts reduce functions and key positions. The key positions are expected in the flattened common data model.
    See Also:
    ReduceFunction
    • Constructor Detail

      • ReduceOperatorBase

        public ReduceOperatorBase​(UserCodeWrapper<FT> udf,
                                  UnaryOperatorInformation<T,​T> operatorInfo,
                                  int[] keyPositions,
                                  String name)
        Creates a grouped reduce data flow operator.
        Parameters:
        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).
      • ReduceOperatorBase

        public ReduceOperatorBase​(FT udf,
                                  UnaryOperatorInformation<T,​T> operatorInfo,
                                  int[] keyPositions,
                                  String name)
        Creates a grouped reduce data flow operator.
        Parameters:
        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).
      • ReduceOperatorBase

        public ReduceOperatorBase​(Class<? extends FT> udf,
                                  UnaryOperatorInformation<T,​T> operatorInfo,
                                  int[] keyPositions,
                                  String name)
        Creates a grouped reduce data flow operator.
        Parameters:
        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).
      • ReduceOperatorBase

        public ReduceOperatorBase​(UserCodeWrapper<FT> udf,
                                  UnaryOperatorInformation<T,​T> operatorInfo,
                                  String name)
        Creates a non-grouped reduce data flow operator (all-reduce).
        Parameters:
        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).
      • ReduceOperatorBase

        public ReduceOperatorBase​(FT udf,
                                  UnaryOperatorInformation<T,​T> operatorInfo,
                                  String name)
        Creates a non-grouped reduce data flow operator (all-reduce).
        Parameters:
        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).
      • ReduceOperatorBase

        public ReduceOperatorBase​(Class<? extends FT> udf,
                                  UnaryOperatorInformation<T,​T> operatorInfo,
                                  String name)
        Creates a non-grouped reduce data flow operator (all-reduce).
        Parameters:
        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).