public class SnapshotShardsService extends AbstractLifecycleComponent implements ClusterStateApplier, IndexEventListener
| Modifier and Type | Class and Description |
|---|---|
static class |
SnapshotShardsService.UpdateIndexShardSnapshotStatusRequest
Internal request that is used to send changes in snapshot status to master
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
UPDATE_SNAPSHOT_ACTION_NAME |
lifecycledeprecationLogger, logger, settings| Constructor and Description |
|---|
SnapshotShardsService(Settings settings,
ClusterService clusterService,
SnapshotsService snapshotsService,
ThreadPool threadPool,
TransportService transportService,
IndicesService indicesService) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyClusterState(ClusterChangedEvent event)
Called when a new cluster state (
ClusterChangedEvent.state() needs to be applied |
void |
beforeIndexShardClosed(ShardId shardId,
IndexShard indexShard,
Settings indexSettings)
Called before the index shard gets closed.
|
java.util.Map<ShardId,IndexShardSnapshotStatus> |
currentSnapshotShards(Snapshot snapshot)
Returns status of shards that are snapshotted on the node and belong to the given snapshot
|
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
void |
updateIndexShardSnapshotStatus(Snapshot snapshot,
ShardId shardId,
SnapshotsInProgress.ShardSnapshotStatus status,
DiscoveryNode master)
Updates the shard status
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stoplogDeprecatedSetting, logRemovedSetting, nodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterIndexCreated, afterIndexRemoved, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardCreated, beforeIndexShardDeleted, indexShardStateChanged, onShardInactive, onStoreClosed, shardRoutingChangedpublic static final java.lang.String UPDATE_SNAPSHOT_ACTION_NAME
@Inject public SnapshotShardsService(Settings settings, ClusterService clusterService, SnapshotsService snapshotsService, ThreadPool threadPool, TransportService transportService, IndicesService indicesService)
protected void doStart()
doStart in class AbstractLifecycleComponentprotected void doStop()
doStop in class AbstractLifecycleComponentprotected void doClose()
doClose in class AbstractLifecycleComponentpublic void applyClusterState(ClusterChangedEvent event)
ClusterStateApplierClusterChangedEvent.state() needs to be appliedapplyClusterState in interface ClusterStateApplierpublic void beforeIndexShardClosed(ShardId shardId, @Nullable IndexShard indexShard, Settings indexSettings)
IndexEventListenerbeforeIndexShardClosed in interface IndexEventListenerindexShard - The index shardpublic java.util.Map<ShardId,IndexShardSnapshotStatus> currentSnapshotShards(Snapshot snapshot)
This method is executed on data node
snapshot - snapshotpublic void updateIndexShardSnapshotStatus(Snapshot snapshot, ShardId shardId, SnapshotsInProgress.ShardSnapshotStatus status, DiscoveryNode master)