Hello everyone,

I have a question about using the Async state APIs in a KeyedProcessFunction. 
I’m defining a pipeline like this, 
keyBy(KeySelector()).enableAsyncState().process(MyKeyedProcessFunction()). 
Inside MyKeyedProcessFunction I’m using the 
org.apache.flink.api.common.state.v2.ValueState APIs:

override fun processElement(value: Event context: Context, out: 
Collector<Event>) {
    state.asyncValue().thenApply { value ->
        // more async state operations
        out.collect(updatedValue)
    }
}

My question is if this kind of async state access also requires my 
KeyedProcessFunction to inherit from DeclaringAsyncKeyedProcessFunction? Since 
I’m now accessing the state asynchronously, is there a benefit to using 
DeclaringAsyncKeyedProcessFunction? 

Thanks a lot,

Francis

Reply via email to