Package org.apache.flink.state.forst
Class ForStAggregatingState<K,N,IN,ACC,OUT>
java.lang.Object
org.apache.flink.runtime.state.v2.AbstractKeyedState<K,N,ACC>
org.apache.flink.runtime.state.v2.AbstractAggregatingState<K,N,IN,ACC,OUT>
org.apache.flink.state.forst.ForStAggregatingState<K,N,IN,ACC,OUT>
- Type Parameters:
K- type of keyIN- type of inputACC- type of aggregate stateOUT- type of output
- All Implemented Interfaces:
org.apache.flink.api.common.state.v2.AggregatingState<IN,,OUT> org.apache.flink.api.common.state.v2.AppendingState<IN,,OUT, OUT> org.apache.flink.api.common.state.v2.MergingState<IN,,OUT, OUT> org.apache.flink.api.common.state.v2.State,org.apache.flink.runtime.state.v2.internal.InternalAggregatingState<K,,N, IN, ACC, OUT> org.apache.flink.runtime.state.v2.internal.InternalAppendingState<K,,N, IN, ACC, OUT, OUT> org.apache.flink.runtime.state.v2.internal.InternalKeyedState<K,,N, ACC> org.apache.flink.runtime.state.v2.internal.InternalMergingState<K,,N, IN, ACC, OUT, OUT> org.apache.flink.runtime.state.v2.internal.InternalPartitionedState<N>,org.apache.flink.runtime.state.v2.internal.InternalStateAccessible<ACC>,ForStInnerTable<K,N, ACC>
public class ForStAggregatingState<K,N,IN,ACC,OUT>
extends org.apache.flink.runtime.state.v2.AbstractAggregatingState<K,N,IN,ACC,OUT>
implements ForStInnerTable<K,N,ACC>
The implementation of
AggregatingState for ForStDB.-
Field Summary
Fields inherited from class org.apache.flink.runtime.state.v2.AbstractAggregatingState
aggregateFunctionFields inherited from class org.apache.flink.runtime.state.v2.AbstractKeyedState
stateRequestHandler -
Constructor Summary
ConstructorsConstructorDescriptionForStAggregatingState(org.apache.flink.api.common.state.v2.AggregatingStateDescriptor<IN, ACC, OUT> stateDescriptor, org.apache.flink.runtime.asyncprocessing.StateRequestHandler stateRequestHandler, org.forstdb.ColumnFamilyHandle columnFamily, Supplier<org.apache.flink.runtime.state.SerializedCompositeKeyBuilder<K>> serializedKeyBuilderInitializer, N defaultNamespace, Supplier<org.apache.flink.api.common.typeutils.TypeSerializer<N>> namespaceSerializerInitializer, Supplier<org.apache.flink.core.memory.DataOutputSerializer> valueSerializerViewInitializer, Supplier<org.apache.flink.core.memory.DataInputDeserializer> valueDeserializerViewInitializer) -
Method Summary
Modifier and TypeMethodDescriptionForStDBGetRequest<K,N, ACC, ?> 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> contextKey) Serialize the given key to bytes.byte[]serializeValue(ACC value) Serialize the given value to the outputView.Methods inherited from class org.apache.flink.runtime.state.v2.AbstractAggregatingState
add, asyncAdd, asyncGet, asyncGetInternal, asyncMergeNamespaces, asyncUpdateInternal, get, getInternal, mergeNamespaces, updateInternalMethods inherited from class org.apache.flink.runtime.state.v2.AbstractKeyedState
asyncClear, clear, getStateDescriptor, getStateRequestHandler, getValueSerializer, handleRequest, handleRequestSync, setCurrentNamespaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.state.v2.internal.InternalPartitionedState
setCurrentNamespaceMethods inherited from interface org.apache.flink.api.common.state.v2.State
asyncClear, clear
-
Constructor Details
-
ForStAggregatingState
public ForStAggregatingState(org.apache.flink.api.common.state.v2.AggregatingStateDescriptor<IN, ACC, OUT> stateDescriptor, org.apache.flink.runtime.asyncprocessing.StateRequestHandler stateRequestHandler, org.forstdb.ColumnFamilyHandle columnFamily, Supplier<org.apache.flink.runtime.state.SerializedCompositeKeyBuilder<K>> serializedKeyBuilderInitializer, N defaultNamespace, Supplier<org.apache.flink.api.common.typeutils.TypeSerializer<N>> namespaceSerializerInitializer, Supplier<org.apache.flink.core.memory.DataOutputSerializer> valueSerializerViewInitializer, Supplier<org.apache.flink.core.memory.DataInputDeserializer> valueDeserializerViewInitializer)
-
-
Method Details
-
getColumnFamilyHandle
public org.forstdb.ColumnFamilyHandle getColumnFamilyHandle()Description copied from interface:ForStInnerTableGet the columnFamily handle corresponding to table.- Specified by:
getColumnFamilyHandlein interfaceForStInnerTable<K,N, IN>
-
serializeKey
Description copied from interface:ForStInnerTableSerialize the given key to bytes.- Specified by:
serializeKeyin interfaceForStInnerTable<K,N, IN> - Parameters:
contextKey- the key to be serialized.- Returns:
- the key bytes
- Throws:
IOException- Thrown if the serialization encountered an I/O related error.
-
serializeValue
Description copied from interface:ForStInnerTableSerialize the given value to the outputView.- Specified by:
serializeValuein interfaceForStInnerTable<K,N, IN> - Parameters:
value- the value to be serialized.- Returns:
- the value bytes
- Throws:
IOException- Thrown if the serialization encountered an I/O related error.
-
deserializeValue
Description copied from interface:ForStInnerTableDeserialize the given bytes value to POJO value.- Specified by:
deserializeValuein interfaceForStInnerTable<K,N, IN> - 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
public ForStDBGetRequest<K,N, buildDBGetRequestACC, ?> (org.apache.flink.runtime.asyncprocessing.StateRequest<?, ?, ?, ?> stateRequest) Description copied from interface:ForStInnerTableBuild aForStDBGetRequestthat belong to thisForStInnerTablewith the given stateRequest.- Specified by:
buildDBGetRequestin interfaceForStInnerTable<K,N, IN> - Parameters:
stateRequest- The given stateRequest.- Returns:
- The corresponding ForSt GetRequest.
-
buildDBPutRequest
public ForStDBPutRequest<?,?, buildDBPutRequest?> (org.apache.flink.runtime.asyncprocessing.StateRequest<?, ?, ?, ?> stateRequest) Description copied from interface:ForStInnerTableBuild aForStDBPutRequestthat belong toForStInnerTablewith the given stateRequest.- Specified by:
buildDBPutRequestin interfaceForStInnerTable<K,N, IN> - Parameters:
stateRequest- The given stateRequest.- Returns:
- The corresponding ForSt PutRequest.
-