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, InternalTimeServiceManager.ShouldStopAdvancingFn| 构造器和说明 |
|---|
BatchExecutionInternalTimeServiceManager(ProcessingTimeService processingTimeService) |
| 限定符和类型 | 方法和说明 |
|---|---|
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.metrics.groups.TaskIOMetricGroup taskIOMetricGroup,
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> |
getAsyncInternalTimerService(String name,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
Triggerable<K,N> triggerable,
org.apache.flink.runtime.asyncprocessing.AsyncExecutionController<K> asyncExecutionController)
Creates an
InternalTimerServiceAsyncImpl for handling a group of timers identified by
the given name. |
<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.
|
boolean |
tryAdvanceWatermark(Watermark watermark,
InternalTimeServiceManager.ShouldStopAdvancingFn shouldStopAdvancingFn)
Try to
InternalTimeServiceManager.advanceWatermark(Watermark), but if InternalTimeServiceManager.ShouldStopAdvancingFn returns
true, stop the advancement and return as soon as possible. |
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 在接口中 InternalTimeServiceManager<K>public <N> InternalTimerService<N> getAsyncInternalTimerService(String name, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, Triggerable<K,N> triggerable, org.apache.flink.runtime.asyncprocessing.AsyncExecutionController<K> asyncExecutionController)
InternalTimeServiceManagerInternalTimerServiceAsyncImpl for handling a group of timers identified by
the given name. The timers are scoped to a key and namespace. Mainly used by async
operators.
Some essential order preservation will be added when the given Triggerable is
invoked.
public void advanceWatermark(Watermark watermark)
InternalTimeServiceManagertimer services,
potentially firing event time timers.advanceWatermark 在接口中 InternalTimeServiceManager<K>public boolean tryAdvanceWatermark(Watermark watermark, InternalTimeServiceManager.ShouldStopAdvancingFn shouldStopAdvancingFn)
InternalTimeServiceManagerInternalTimeServiceManager.advanceWatermark(Watermark), but if InternalTimeServiceManager.ShouldStopAdvancingFn returns
true, stop the advancement and return as soon as possible.tryAdvanceWatermark 在接口中 InternalTimeServiceManager<K>Watermark has been fully processed, false otherwise.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 在接口中 InternalTimeServiceManager<K>Exceptionpublic static <K> InternalTimeServiceManager<K> create(org.apache.flink.runtime.metrics.groups.TaskIOMetricGroup taskIOMetricGroup, 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.