Package org.apache.flink.state.table
Class KeyedStateReader
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.state.api.functions.KeyedStateReaderFunction<Object,org.apache.flink.table.data.RowData>
-
- org.apache.flink.state.table.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.state.api.functions.KeyedStateReaderFunction
KeyedStateReaderFunction.Context
-
-
Constructor Summary
Constructors Constructor Description KeyedStateReader(org.apache.flink.table.types.logical.RowType rowType, org.apache.flink.api.java.tuple.Tuple2<Integer,List<StateValueColumnConfiguration>> keyValueProjections)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
open(org.apache.flink.api.common.functions.OpenContext openContext)
void
readKey(Object key, KeyedStateReaderFunction.Context context, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
Process one key from the restored state backend.
-
-
-
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 interfaceorg.apache.flink.api.common.functions.RichFunction
- Overrides:
open
in classorg.apache.flink.api.common.functions.AbstractRichFunction
- Throws:
Exception
-
close
public void close()
- Specified by:
close
in interfaceorg.apache.flink.api.common.functions.RichFunction
- Overrides:
close
in classorg.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 classKeyedStateReaderFunction<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.
-
-