Package org.apache.flink.state.forst
Interface ForStInnerTable<K,V>
-
- Type Parameters:
K- The key type of the table.V- The value type of the table.
- All Known Implementing Classes:
ForStValueState
public interface ForStInnerTable<K,V>The concept of an abstracted table oriented towards ForStDB, and each ForStInnerTable can be mapped to a ForSt internal State.The mapping between ForStInnerTable and ForStDB's columnFamily can be one-to-one or many-to-one.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ForStDBGetRequest<K,V>buildDBGetRequest(org.apache.flink.runtime.asyncprocessing.StateRequest<?,?,?> stateRequest)Build aForStDBGetRequestthat belong to thisForStInnerTablewith the given stateRequest.ForStDBPutRequest<K,V>buildDBPutRequest(org.apache.flink.runtime.asyncprocessing.StateRequest<?,?,?> stateRequest)Build aForStDBPutRequestthat belong toForStInnerTablewith the given stateRequest.VdeserializeValue(byte[] value)Deserialize the given bytes value to POJO value.org.rocksdb.ColumnFamilyHandlegetColumnFamilyHandle()Get the columnFamily handle corresponding to table.byte[]serializeKey(K key)Serialize the given key to bytes.byte[]serializeValue(V value)Serialize the given value to the outputView.
-
-
-
Method Detail
-
getColumnFamilyHandle
org.rocksdb.ColumnFamilyHandle getColumnFamilyHandle()
Get the columnFamily handle corresponding to table.
-
serializeKey
byte[] serializeKey(K key) throws IOException
Serialize the given key to bytes.- Parameters:
key- the key to be serialized.- Returns:
- the key bytes
- Throws:
IOException- Thrown if the serialization encountered an I/O related error.
-
serializeValue
byte[] serializeValue(V value) throws IOException
Serialize the given value to the outputView.- Parameters:
value- the value to be serialized.- Returns:
- the value bytes
- Throws:
IOException- Thrown if the serialization encountered an I/O related error.
-
deserializeValue
V deserializeValue(byte[] value) throws IOException
Deserialize the given bytes value to POJO value.- Parameters:
value- the value bytes to be deserialized.- Returns:
- the deserialized POJO value
- Throws:
IOException- Thrown if the deserialization encountered an I/O related error.
-
buildDBGetRequest
ForStDBGetRequest<K,V> buildDBGetRequest(org.apache.flink.runtime.asyncprocessing.StateRequest<?,?,?> stateRequest)
Build aForStDBGetRequestthat belong to thisForStInnerTablewith the given stateRequest.- Parameters:
stateRequest- The given stateRequest.- Returns:
- The corresponding ForSt GetRequest.
-
buildDBPutRequest
ForStDBPutRequest<K,V> buildDBPutRequest(org.apache.flink.runtime.asyncprocessing.StateRequest<?,?,?> stateRequest)
Build aForStDBPutRequestthat belong toForStInnerTablewith the given stateRequest.- Parameters:
stateRequest- The given stateRequest.- Returns:
- The corresponding ForSt PutRequest.
-
-