Class PartitionReduceOperator<IN>

java.lang.Object
org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<IN,org.apache.flink.api.common.functions.ReduceFunction<IN>>
org.apache.flink.streaming.api.operators.PartitionReduceOperator<IN>
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.state.CheckpointListener, BoundedOneInput, Input<IN>, KeyContext, KeyContextHandler, OneInputStreamOperator<IN,IN>, org.apache.flink.streaming.api.operators.OutputTypeConfigurable<IN>, StreamOperator<IN>, StreamOperatorStateHandler.CheckpointedStreamOperator, UserFunctionProvider<org.apache.flink.api.common.functions.ReduceFunction<IN>>, YieldingOperator<IN>

@Internal public class PartitionReduceOperator<IN> extends AbstractUdfStreamOperator<IN,org.apache.flink.api.common.functions.ReduceFunction<IN>> implements OneInputStreamOperator<IN,IN>, BoundedOneInput
The PartitionReduceOperator is used to apply the reduce transformation on all records of each partition. Each partition contains all records of a subtask.
See Also:
  • Constructor Details

    • PartitionReduceOperator

      public PartitionReduceOperator(org.apache.flink.api.common.functions.ReduceFunction<IN> reduceFunction)
  • Method Details

    • processElement

      public void processElement(StreamRecord<IN> element) throws Exception
      Description copied from interface: Input
      Processes one element that arrived on this input of the MultipleInputStreamOperator. This method is guaranteed to not be called concurrently with other methods of the operator.
      Specified by:
      processElement in interface Input<IN>
      Throws:
      Exception
    • endInput

      public void endInput() throws Exception
      Description copied from interface: BoundedOneInput
      It is notified that no more data will arrive from the input.

      WARNING: It is not safe to use this method to commit any transactions or other side effects! You can use this method to flush any buffered data that can later on be committed e.g. in a CheckpointListener.notifyCheckpointComplete(long).

      NOTE: Given it is semantically very similar to the StreamOperator.finish() method. It might be dropped in favour of the other method at some point in time.

      Specified by:
      endInput in interface BoundedOneInput
      Throws:
      Exception
    • getOperatorAttributes

      public OperatorAttributes getOperatorAttributes()
      Description copied from interface: StreamOperator
      Called to get the OperatorAttributes of the operator. If there is no defined attribute, a default OperatorAttributes is built.
      Specified by:
      getOperatorAttributes in interface StreamOperator<IN>
      Returns:
      OperatorAttributes of the operator.