Class ReduceApplyProcessAllWindowFunction<W extends Window,T,R>

java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.streaming.api.functions.windowing.ProcessAllWindowFunction<T,R,W>
org.apache.flink.streaming.api.functions.windowing.ReduceApplyProcessAllWindowFunction<W,T,R>
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction

@Internal public class ReduceApplyProcessAllWindowFunction<W extends Window,T,R> extends ProcessAllWindowFunction<T,R,W>
Internal ProcessAllWindowFunction that is used for implementing a fold on a window configuration that only allows AllWindowFunction and cannot directly execute a ReduceFunction.
See Also:
  • Constructor Details

    • ReduceApplyProcessAllWindowFunction

      public ReduceApplyProcessAllWindowFunction(org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction, ProcessAllWindowFunction<T,R,W> windowFunction)
  • Method Details

    • process

      public void process(ProcessAllWindowFunction<T,R,W>.Context context, Iterable<T> input, org.apache.flink.util.Collector<R> out) throws Exception
      Description copied from class: ProcessAllWindowFunction
      Evaluates the window and outputs none or several elements.
      Specified by:
      process in class ProcessAllWindowFunction<T,R,W extends Window>
      Parameters:
      context - The context in which the window is being evaluated.
      input - The elements in the window being evaluated.
      out - A collector for emitting elements.
      Throws:
      Exception - The function may throw exceptions to fail the program and trigger recovery.
    • clear

      public void clear(ProcessAllWindowFunction<T,R,W>.Context context) throws Exception
      Description copied from class: ProcessAllWindowFunction
      Deletes any state in the Context when the Window expires (the watermark passes its maxTimestamp + allowedLateness).
      Overrides:
      clear in class ProcessAllWindowFunction<T,R,W extends Window>
      Parameters:
      context - The context to which the window is being evaluated
      Throws:
      Exception - The function may throw exceptions to fail the program and trigger recovery.
    • open

      public void open(org.apache.flink.api.common.functions.OpenContext openContext) throws Exception
      Specified by:
      open in interface org.apache.flink.api.common.functions.RichFunction
      Overrides:
      open in class org.apache.flink.api.common.functions.AbstractRichFunction
      Throws:
      Exception
    • close

      public void close() throws Exception
      Specified by:
      close in interface org.apache.flink.api.common.functions.RichFunction
      Overrides:
      close in class org.apache.flink.api.common.functions.AbstractRichFunction
      Throws:
      Exception
    • setRuntimeContext

      public void setRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t)
      Specified by:
      setRuntimeContext in interface org.apache.flink.api.common.functions.RichFunction
      Overrides:
      setRuntimeContext in class org.apache.flink.api.common.functions.AbstractRichFunction