java.io.Closeable
, java.lang.AutoCloseable
, ClusterStateListener
, LifecycleComponent
, Releasable
, IndexEventListener
public class SnapshotShardsService extends AbstractLifecycleComponent implements ClusterStateListener, IndexEventListener
Modifier and Type | Class | Description |
---|---|---|
static class |
SnapshotShardsService.UpdateIndexShardSnapshotStatusRequest |
Internal request that is used to send changes in snapshot status to master
|
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
UPDATE_SNAPSHOT_STATUS_ACTION_NAME |
|
static java.lang.String |
UPDATE_SNAPSHOT_STATUS_ACTION_NAME_V6 |
deprecationLogger, logger, settings
lifecycle
Constructor | Description |
---|---|
SnapshotShardsService(Settings settings,
ClusterService clusterService,
SnapshotsService snapshotsService,
ThreadPool threadPool,
TransportService transportService,
IndicesService indicesService,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) |
Modifier and Type | Method | Description |
---|---|---|
void |
beforeIndexShardClosed(ShardId shardId,
IndexShard indexShard,
Settings indexSettings) |
Called before the index shard gets closed.
|
void |
clusterChanged(ClusterChangedEvent event) |
Called when cluster state changes.
|
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() |
logDeprecatedSetting, logRemovedSetting, nodeName
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
afterIndexCreated, afterIndexRemoved, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardCreated, beforeIndexShardDeleted, indexShardStateChanged, onShardInactive, onStoreClosed, shardRoutingChanged
public static final java.lang.String UPDATE_SNAPSHOT_STATUS_ACTION_NAME_V6
public static final java.lang.String UPDATE_SNAPSHOT_STATUS_ACTION_NAME
@Inject public SnapshotShardsService(Settings settings, ClusterService clusterService, SnapshotsService snapshotsService, ThreadPool threadPool, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
protected void doStart()
doStart
in class AbstractLifecycleComponent
protected void doStop()
doStop
in class AbstractLifecycleComponent
protected void doClose()
doClose
in class AbstractLifecycleComponent
public void clusterChanged(ClusterChangedEvent event)
ClusterStateListener
clusterChanged
in interface ClusterStateListener
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