use of org.apache.flink.runtime.state.internal.InternalValueState in project flink by apache.
the class RowTimeWindowDeduplicateProcessor method open.
@Override
public void open(Context<Long> context) throws Exception {
this.ctx = context;
final LongSerializer namespaceSerializer = LongSerializer.INSTANCE;
ValueStateDescriptor<RowData> valueStateDescriptor = new ValueStateDescriptor<>("window_deduplicate", inputSerializer);
ValueState<RowData> state = ctx.getKeyedStateBackend().getOrCreateKeyedState(namespaceSerializer, valueStateDescriptor);
this.windowTimerService = new WindowTimerServiceImpl(ctx.getTimerService(), shiftTimeZone);
this.windowState = new WindowValueState<>((InternalValueState<RowData, Long, RowData>) state);
this.windowBuffer = bufferFactory.create(ctx.getOperatorOwner(), ctx.getMemoryManager(), ctx.getMemorySize(), ctx.getRuntimeContext(), windowTimerService, ctx.getKeyedStateBackend(), windowState, true, shiftTimeZone);
this.currentProgress = Long.MIN_VALUE;
}
Aggregations