public class BatchExecutionInternalTimeServiceManager<K> extends Object implements InternalTimeServiceManager<K>, org.apache.flink.runtime.state.KeyedStateBackend.KeySelectionListener<K>
InternalTimeServiceManager that manages timers with a single
active key at a time. Can be used in a BATCH execution mode.InternalTimeServiceManager.Provider| Constructor and Description |
|---|
BatchExecutionInternalTimeServiceManager(ProcessingTimeService processingTimeService) |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceWatermark(Watermark watermark)
Advances the Watermark of all managed
timer services,
potentially firing event time timers. |
static <K> InternalTimeServiceManager<K> |
create(org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K> keyedStatedBackend,
ClassLoader userClassloader,
KeyContext keyContext,
ProcessingTimeService processingTimeService,
Iterable<org.apache.flink.runtime.state.KeyGroupStatePartitionStreamProvider> rawKeyedStates,
StreamTaskCancellationContext cancellationContext) |
<N> InternalTimerService<N> |
getInternalTimerService(String name,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
Triggerable<K,N> triggerable)
Creates an
InternalTimerService for handling a group of timers identified by the
given name. |
void |
keySelected(K newKey) |
void |
snapshotToRawKeyedState(org.apache.flink.runtime.state.KeyedStateCheckpointOutputStream context,
String operatorName)
Snapshots the timers to raw keyed state.
|
public BatchExecutionInternalTimeServiceManager(ProcessingTimeService processingTimeService)
public <N> InternalTimerService<N> getInternalTimerService(String name, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, Triggerable<K,N> triggerable)
InternalTimeServiceManagerInternalTimerService for handling a group of timers identified by the
given name. The timers are scoped to a key and namespace.
When a timer fires the given Triggerable will be invoked.
getInternalTimerService in interface InternalTimeServiceManager<K>public void advanceWatermark(Watermark watermark)
InternalTimeServiceManagertimer services,
potentially firing event time timers.advanceWatermark in interface InternalTimeServiceManager<K>public void snapshotToRawKeyedState(org.apache.flink.runtime.state.KeyedStateCheckpointOutputStream context,
String operatorName)
throws Exception
InternalTimeServiceManagerTODO: This can be removed once heap-based timers are integrated with RocksDB incremental snapshots.
snapshotToRawKeyedState in interface InternalTimeServiceManager<K>Exceptionpublic static <K> InternalTimeServiceManager<K> create(org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K> keyedStatedBackend, ClassLoader userClassloader, KeyContext keyContext, ProcessingTimeService processingTimeService, Iterable<org.apache.flink.runtime.state.KeyGroupStatePartitionStreamProvider> rawKeyedStates, StreamTaskCancellationContext cancellationContext)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.