use of org.apache.flink.streaming.api.SimpleTimerService in project flink by apache.
the class AbstractPythonStreamGroupAggregateOperator method open.
@Override
public void open() throws Exception {
// The structure is: [type]|[normal record]|[timestamp of timer]|[row key]
// If the type is 'NORMAL_RECORD', store the RowData object in the 2nd column.
// If the type is 'TRIGGER_TIMER', store the timestamp in 3rd column and the row key
reuseRowData = new UpdatableRowData(GenericRowData.of(NORMAL_RECORD, null, null, null), 4);
reuseTimerRowData = new UpdatableRowData(GenericRowData.of(TRIGGER_TIMER, null, null, null), 4);
timerService = new SimpleTimerService(getInternalTimerService("state-clean-timer", VoidNamespaceSerializer.INSTANCE, this));
initCleanupTimeState();
super.open();
}
use of org.apache.flink.streaming.api.SimpleTimerService in project flink by apache.
the class BaseTwoInputStreamOperatorWithStateRetention method initializeTimerService.
private void initializeTimerService() {
InternalTimerService<VoidNamespace> internalTimerService = getInternalTimerService(TIMERS_STATE_NAME, VoidNamespaceSerializer.INSTANCE, this);
timerService = new SimpleTimerService(internalTimerService);
}
use of org.apache.flink.streaming.api.SimpleTimerService in project flink by apache.
the class KeyedProcessOperator method open.
@Override
public void open() throws Exception {
super.open();
collector = new TimestampedCollector<>(output);
InternalTimerService<VoidNamespace> internalTimerService = getInternalTimerService("user-timers", VoidNamespaceSerializer.INSTANCE, this);
TimerService timerService = new SimpleTimerService(internalTimerService);
context = new ContextImpl(userFunction, timerService);
onTimerContext = new OnTimerContextImpl(userFunction, timerService);
}
use of org.apache.flink.streaming.api.SimpleTimerService in project flink by apache.
the class LegacyKeyedProcessOperator method open.
@Override
public void open() throws Exception {
super.open();
collector = new TimestampedCollector<>(output);
InternalTimerService<VoidNamespace> internalTimerService = getInternalTimerService("user-timers", VoidNamespaceSerializer.INSTANCE, this);
TimerService timerService = new SimpleTimerService(internalTimerService);
context = new ContextImpl(userFunction, timerService);
onTimerContext = new OnTimerContextImpl(userFunction, timerService);
}
use of org.apache.flink.streaming.api.SimpleTimerService in project flink by apache.
the class BaseTemporalSortOperator method open.
@Override
public void open() throws Exception {
InternalTimerService<VoidNamespace> internalTimerService = getInternalTimerService("user-timers", VoidNamespaceSerializer.INSTANCE, this);
timerService = new SimpleTimerService(internalTimerService);
collector = new TimestampedCollector<>(output);
}
Aggregations