Class WindowReader<W extends org.apache.flink.streaming.api.windowing.windows.Window>

  • Type Parameters:
    W - The type of Window.

    @PublicEvolving
    @Deprecated
    public class WindowReader<W extends org.apache.flink.streaming.api.windowing.windows.Window>
    extends Object
    Deprecated.
    This class provides entry points for reading keyed state written out using the WindowOperator.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      <K,​T,​ACC,​R>
      org.apache.flink.api.java.operators.DataSource<R>
      aggregate​(String uid, org.apache.flink.api.common.functions.AggregateFunction<T,​ACC,​R> aggregateFunction, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType, org.apache.flink.api.common.typeinfo.TypeInformation<ACC> accType, org.apache.flink.api.common.typeinfo.TypeInformation<R> outputType)
      Deprecated.
      Reads window state generated using an AggregateFunction.
      <K,​T,​ACC,​R,​OUT>
      org.apache.flink.api.java.operators.DataSource<OUT>
      aggregate​(String uid, org.apache.flink.api.common.functions.AggregateFunction<T,​ACC,​R> aggregateFunction, WindowReaderFunction<R,​OUT,​K,​W> readerFunction, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType, org.apache.flink.api.common.typeinfo.TypeInformation<ACC> accType, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType)
      Deprecated.
      Reads window state generated using an AggregateFunction.
      EvictingWindowReader<W> evictor()
      Deprecated.
      Reads from a window that uses an evictor.
      <K,​T,​OUT>
      org.apache.flink.api.java.operators.DataSource<OUT>
      process​(String uid, WindowReaderFunction<T,​OUT,​K,​W> readerFunction, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType, org.apache.flink.api.common.typeinfo.TypeInformation<T> stateType, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType)
      Deprecated.
      Reads window state generated without any preaggregation such as WindowedStream#apply and WindowedStream#process.
      <T,​K>
      org.apache.flink.api.java.operators.DataSource<T>
      reduce​(String uid, org.apache.flink.api.common.functions.ReduceFunction<T> function, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType, org.apache.flink.api.common.typeinfo.TypeInformation<T> reduceType)
      Deprecated.
      Reads window state generated using a ReduceFunction.
      <K,​T,​OUT>
      org.apache.flink.api.java.operators.DataSource<OUT>
      reduce​(String uid, org.apache.flink.api.common.functions.ReduceFunction<T> function, WindowReaderFunction<T,​OUT,​K,​W> readerFunction, org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType, org.apache.flink.api.common.typeinfo.TypeInformation<T> reduceType, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType)
      Deprecated.
      Reads window state generated using a ReduceFunction.
    • Method Detail

      • evictor

        public EvictingWindowReader<W> evictor()
        Deprecated.
        Reads from a window that uses an evictor.
      • reduce

        public <T,​K> org.apache.flink.api.java.operators.DataSource<T> reduce​(String uid,
                                                                                    org.apache.flink.api.common.functions.ReduceFunction<T> function,
                                                                                    org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType,
                                                                                    org.apache.flink.api.common.typeinfo.TypeInformation<T> reduceType)
                                                                             throws IOException
        Deprecated.
        Reads window state generated using a ReduceFunction.
        Type Parameters:
        T - The type of the reduce function.
        K - The key type of the operator.
        Parameters:
        uid - The uid of the operator.
        function - The reduce function used to create the window.
        keyType - The key type of the window.
        reduceType - The type information of the reduce function.
        Returns:
        A DataSet of objects read from keyed state.
        Throws:
        IOException - If savepoint does not contain the specified uid.
      • reduce

        public <K,​T,​OUT> org.apache.flink.api.java.operators.DataSource<OUT> reduce​(String uid,
                                                                                                org.apache.flink.api.common.functions.ReduceFunction<T> function,
                                                                                                WindowReaderFunction<T,​OUT,​K,​W> readerFunction,
                                                                                                org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType,
                                                                                                org.apache.flink.api.common.typeinfo.TypeInformation<T> reduceType,
                                                                                                org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType)
                                                                                         throws IOException
        Deprecated.
        Reads window state generated using a ReduceFunction.
        Type Parameters:
        K - The type of the key.
        T - The type of the reduce function.
        OUT - The output type of the reduce function.
        Parameters:
        uid - The uid of the operator.
        function - The reduce function used to create the window.
        readerFunction - The window reader function.
        keyType - The key type of the window.
        reduceType - The type information of the reduce function.
        outputType - The output type of the reader function.
        Returns:
        A DataSet of objects read from keyed state.
        Throws:
        IOException - If savepoint does not contain the specified uid.
      • aggregate

        public <K,​T,​ACC,​R> org.apache.flink.api.java.operators.DataSource<R> aggregate​(String uid,
                                                                                                         org.apache.flink.api.common.functions.AggregateFunction<T,​ACC,​R> aggregateFunction,
                                                                                                         org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType,
                                                                                                         org.apache.flink.api.common.typeinfo.TypeInformation<ACC> accType,
                                                                                                         org.apache.flink.api.common.typeinfo.TypeInformation<R> outputType)
                                                                                                  throws IOException
        Deprecated.
        Reads window state generated using an AggregateFunction.
        Type Parameters:
        K - The type of the key.
        T - The type of the values that are aggregated.
        ACC - The type of the accumulator (intermediate aggregate state).
        R - The type of the aggregated result.
        Parameters:
        uid - The uid of the operator.
        aggregateFunction - The aggregate function used to create the window.
        keyType - The key type of the window.
        accType - The type information of the accumulator function.
        outputType - The output type of the reader function.
        Returns:
        A DataSet of objects read from keyed state.
        Throws:
        IOException - If savepoint does not contain the specified uid.
      • aggregate

        public <K,​T,​ACC,​R,​OUT> org.apache.flink.api.java.operators.DataSource<OUT> aggregate​(String uid,
                                                                                                                     org.apache.flink.api.common.functions.AggregateFunction<T,​ACC,​R> aggregateFunction,
                                                                                                                     WindowReaderFunction<R,​OUT,​K,​W> readerFunction,
                                                                                                                     org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType,
                                                                                                                     org.apache.flink.api.common.typeinfo.TypeInformation<ACC> accType,
                                                                                                                     org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType)
                                                                                                              throws IOException
        Deprecated.
        Reads window state generated using an AggregateFunction.
        Type Parameters:
        K - The type of the key.
        T - The type of the values that are aggregated.
        ACC - The type of the accumulator (intermediate aggregate state).
        R - The type of the aggregated result.
        OUT - The output type of the reader function.
        Parameters:
        uid - The uid of the operator.
        aggregateFunction - The aggregate function used to create the window.
        readerFunction - The window reader function.
        keyType - The key type of the window.
        accType - The type information of the accumulator function.
        outputType - The output type of the reader function.
        Returns:
        A DataSet of objects read from keyed state.
        Throws:
        IOException - If savepoint does not contain the specified uid.
      • process

        public <K,​T,​OUT> org.apache.flink.api.java.operators.DataSource<OUT> process​(String uid,
                                                                                                 WindowReaderFunction<T,​OUT,​K,​W> readerFunction,
                                                                                                 org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType,
                                                                                                 org.apache.flink.api.common.typeinfo.TypeInformation<T> stateType,
                                                                                                 org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType)
                                                                                          throws IOException
        Deprecated.
        Reads window state generated without any preaggregation such as WindowedStream#apply and WindowedStream#process.
        Type Parameters:
        K - The type of the key.
        T - The type of the records stored in state.
        OUT - The output type of the reader function.
        Parameters:
        uid - The uid of the operator.
        readerFunction - The window reader function.
        keyType - The key type of the window.
        stateType - The type of records stored in state.
        outputType - The output type of the reader function.
        Returns:
        A DataSet of objects read from keyed state.
        Throws:
        IOException - If the savepoint does not contain the specified uid.