Class KeyedStateReader

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction

    public class KeyedStateReader
    extends KeyedStateReaderFunction<Object,​org.apache.flink.table.data.RowData>
    Keyed state reader function for value, list and map state types.
    See Also:
    Serialized Form
    • Constructor Detail

      • KeyedStateReader

        public KeyedStateReader​(org.apache.flink.table.types.logical.RowType rowType,
                                org.apache.flink.api.java.tuple.Tuple2<Integer,​List<StateValueColumnConfiguration>> keyValueProjections)
    • Method Detail

      • 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()
        Specified by:
        close in interface org.apache.flink.api.common.functions.RichFunction
        Overrides:
        close in class org.apache.flink.api.common.functions.AbstractRichFunction
      • readKey

        public void readKey​(Object key,
                            KeyedStateReaderFunction.Context context,
                            org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
                     throws Exception
        Description copied from class: KeyedStateReaderFunction
        Process one key from the restored state backend.

        This function can read partitioned state from the restored state backend and output zero or more elements using the Collector parameter.

        Specified by:
        readKey in class KeyedStateReaderFunction<Object,​org.apache.flink.table.data.RowData>
        Parameters:
        key - The input value.
        out - The collector for returning result values.
        Throws:
        Exception - This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.