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 |
lifecycle
deprecationLogger, 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() |
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
logDeprecatedSetting, logRemovedSetting, nodeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterIndexCreated, afterIndexRemoved, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardCreated, beforeIndexShardDeleted, indexShardStateChanged, onShardInactive, onStoreClosed, shardRoutingChanged
public 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 AbstractLifecycleComponent
protected void doStop()
doStop
in class AbstractLifecycleComponent
protected void doClose()
doClose
in class AbstractLifecycleComponent
public void applyClusterState(ClusterChangedEvent event)
ClusterStateApplier
ClusterChangedEvent.state()
needs to be appliedapplyClusterState
in interface ClusterStateApplier
public void beforeIndexShardClosed(ShardId shardId, @Nullable IndexShard indexShard, Settings indexSettings)
IndexEventListener
beforeIndexShardClosed
in interface IndexEventListener
indexShard
- The index shardpublic java.util.Map<ShardId,IndexShardSnapshotStatus> currentSnapshotShards(Snapshot snapshot)
This method is executed on data node
snapshot
- snapshot