Package org.apache.flink.state.forst
Interface ForStInnerTable<K,N,V>
- Type Parameters:
K- The key type of the table.V- The value type of the table.
- All Known Implementing Classes:
ForStAggregatingState,ForStListState,ForStMapState,ForStReducingState,ForStValueState
public interface ForStInnerTable<K,N,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
Modifier and TypeMethodDescriptionForStDBGetRequest<?,?, ?, ?> buildDBGetRequest(org.apache.flink.runtime.asyncprocessing.StateRequest<?, ?, ?, ?> stateRequest) Build aForStDBGetRequestthat belong to thisForStInnerTablewith the given stateRequest.ForStDBPutRequest<?,?, ?> buildDBPutRequest(org.apache.flink.runtime.asyncprocessing.StateRequest<?, ?, ?, ?> stateRequest) Build aForStDBPutRequestthat belong toForStInnerTablewith the given stateRequest.deserializeValue(byte[] value) Deserialize the given bytes value to POJO value.org.forstdb.ColumnFamilyHandleGet the columnFamily handle corresponding to table.byte[]serializeKey(ContextKey<K, N> key) Serialize the given key to bytes.byte[]serializeValue(V value) Serialize the given value to the outputView.
-
Method Details
-
getColumnFamilyHandle
org.forstdb.ColumnFamilyHandle getColumnFamilyHandle()Get the columnFamily handle corresponding to table. -
serializeKey
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
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
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<?,?, 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<?,?, 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.
-