@Internal public interface TaskChangelogRegistry
StateObjects
, each
representing one or more changelog segments. Changelog segments are uploaded by StateChangelogWriters
of a StateChangelogStorage
.
Initially, when starting the tracking
, the
ownership of a changelog segments is not clear, and it is assumed that JM might
be the owner. Once the backends are not using the segments, JM can not become an owner anymore.
the state is discarded.
However, if at any point it becomes known that JM is the owner, tracking is stopped
and the state will not be discarded.
It is the client responsibility to make sure that JM can not become an owner when calling
notUsed(StreamStateHandle, UUID)
.
Modifier and Type | Field and Description |
---|---|
static TaskChangelogRegistry |
NO_OP |
Modifier and Type | Method and Description |
---|---|
static TaskChangelogRegistry |
defaultChangelogRegistry(Executor executor) |
static TaskChangelogRegistry |
defaultChangelogRegistry(int numAsyncDiscardThreads) |
void |
notUsed(StreamStateHandle handle,
UUID backendId)
Mark the state as unused by the given backend, e.g.
|
void |
startTracking(StreamStateHandle handle,
Set<UUID> backendIDs)
Start tracking the state uploaded for the given backends.
|
void |
stopTracking(StreamStateHandle handle)
Stop tracking the state, so that it's not tracked (some other component is doing that).
|
static final TaskChangelogRegistry NO_OP
void startTracking(StreamStateHandle handle, Set<UUID> backendIDs)
void stopTracking(StreamStateHandle handle)
void notUsed(StreamStateHandle handle, UUID backendId)
unregistered
earlier).static TaskChangelogRegistry defaultChangelogRegistry(int numAsyncDiscardThreads)
@VisibleForTesting static TaskChangelogRegistry defaultChangelogRegistry(Executor executor)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.