Module org.elasticsearch.server
Package org.elasticsearch.snapshots
Class SnapshotShutdownProgressTracker
java.lang.Object
org.elasticsearch.snapshots.SnapshotShutdownProgressTracker
Tracks progress of shard snapshots during shutdown, on this single data node. Periodically reports progress via logging, the interval for
which see
SNAPSHOT_PROGRESS_DURING_SHUTDOWN_LOG_INTERVAL_SETTING
.-
Field Summary
FieldsModifier and TypeFieldDescriptionHow frequently shard snapshot progress is logged after receiving local node shutdown metadata. -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotShutdownProgressTracker
(Supplier<String> localNodeIdSupplier, Consumer<org.apache.logging.log4j.Logger> logShardStatuses, ClusterSettings clusterSettings, ThreadPool threadPool) -
Method Summary
Modifier and TypeMethodDescriptionvoid
decNumberOfShardSnapshotsInProgress
(ShardId shardId, Snapshot snapshot, IndexShardSnapshotStatus shardSnapshotStatus) Tracks how many shard snapshots have finished since shutdown mode began.void
incNumberOfShardSnapshotsInProgress
(ShardId shardId, Snapshot snapshot) Tracks how many shard snapshots are started.void
Called as soon as a node shutdown signal is received.void
Called when the cluster state update processing a shutdown signal has finished signalling (setting PAUSING) all shard snapshots to pause.void
The cluster state indicating that a node is to be shutdown may be cleared instead of following through with node shutdown.void
releaseRequestSentToMaster
(Snapshot snapshot, ShardId shardId) Stops tracking a request to update a shard snapshot status sent to the master node.void
trackRequestSentToMaster
(Snapshot snapshot, ShardId shardId) Uniquely tracks a request to update a shard snapshot status sent to the master node.
-
Field Details
-
SNAPSHOT_PROGRESS_DURING_SHUTDOWN_LOG_INTERVAL_SETTING
How frequently shard snapshot progress is logged after receiving local node shutdown metadata.
-
-
Constructor Details
-
SnapshotShutdownProgressTracker
public SnapshotShutdownProgressTracker(Supplier<String> localNodeIdSupplier, Consumer<org.apache.logging.log4j.Logger> logShardStatuses, ClusterSettings clusterSettings, ThreadPool threadPool)
-
-
Method Details
-
onClusterStateAddShutdown
public void onClusterStateAddShutdown()Called as soon as a node shutdown signal is received. -
onClusterStatePausingSetForAllShardSnapshots
public void onClusterStatePausingSetForAllShardSnapshots()Called when the cluster state update processing a shutdown signal has finished signalling (setting PAUSING) all shard snapshots to pause. -
onClusterStateRemoveShutdown
public void onClusterStateRemoveShutdown()The cluster state indicating that a node is to be shutdown may be cleared instead of following through with node shutdown. In that case, no further shutdown shard snapshot progress reporting is desired. -
incNumberOfShardSnapshotsInProgress
Tracks how many shard snapshots are started. -
decNumberOfShardSnapshotsInProgress
public void decNumberOfShardSnapshotsInProgress(ShardId shardId, Snapshot snapshot, IndexShardSnapshotStatus shardSnapshotStatus) Tracks how many shard snapshots have finished since shutdown mode began. -
trackRequestSentToMaster
Uniquely tracks a request to update a shard snapshot status sent to the master node. Idempotent, safe to call multiple times.- Parameters:
snapshot
- first part of a unique tracking identifiershardId
- second part of a unique tracking identifier
-
releaseRequestSentToMaster
Stops tracking a request to update a shard snapshot status sent to the master node. Idempotent, safe to call multiple times.- Parameters:
snapshot
- first part of a unique tracking identifiershardId
- second part of a unique tracking identifier
-