Class EvictingWindowReaderFunction<IN,​R,​OUT,​KEY,​W extends org.apache.flink.streaming.api.windowing.windows.Window>

  • Type Parameters:
    IN - The input type stored in state.
    R - The aggregated type.
    OUT - The output type of the reader function.
    KEY - The key type.
    W - The window type.
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction
    Direct Known Subclasses:
    AggregateEvictingWindowReaderFunction, ProcessEvictingWindowReader, ReduceEvictingWindowReaderFunction

    @Internal
    public abstract class EvictingWindowReaderFunction<IN,​R,​OUT,​KEY,​W extends org.apache.flink.streaming.api.windowing.windows.Window>
    extends WindowReaderFunction<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>,​OUT,​KEY,​W>
    Wrapper for reading state from an evicting window operator.
    See Also:
    Serialized Form
    • Constructor Detail

    • Method Detail

      • open

        public void open​(org.apache.flink.api.common.functions.OpenContext openContext)
                  throws Exception
        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
      • readWindow

        public void readWindow​(KEY key,
                               WindowReaderFunction.Context<W> context,
                               Iterable<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> elements,
                               org.apache.flink.util.Collector<OUT> out)
                        throws Exception
        Description copied from class: WindowReaderFunction
        Evaluates the window and outputs none or several elements.
        Specified by:
        readWindow in class WindowReaderFunction<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>,​OUT,​KEY,​W extends org.apache.flink.streaming.api.windowing.windows.Window>
        Parameters:
        key - The key for which this window is evaluated.
        context - The context in which the window is being evaluated.
        elements - 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.