public class SnapshotShardsService extends AbstractLifecycleComponent<SnapshotShardsService> implements ClusterStateListener
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 |
clusterChanged(ClusterChangedEvent event)
Called when cluster state changes.
|
java.util.Map<ShardId,IndexShardSnapshotStatus> |
currentSnapshotShards(SnapshotId snapshotId)
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(SnapshotId snapshotId,
ShardId shardId,
SnapshotsInProgress.ShardSnapshotStatus status)
Updates the shard status
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
logDeprecatedSetting, logRemovedSetting, nodeName
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<SnapshotShardsService>
protected void doStop()
doStop
in class AbstractLifecycleComponent<SnapshotShardsService>
protected void doClose()
doClose
in class AbstractLifecycleComponent<SnapshotShardsService>
public void clusterChanged(ClusterChangedEvent event)
ClusterStateListener
clusterChanged
in interface ClusterStateListener
public java.util.Map<ShardId,IndexShardSnapshotStatus> currentSnapshotShards(SnapshotId snapshotId)
This method is executed on data node
snapshotId
- snapshot idpublic void updateIndexShardSnapshotStatus(SnapshotId snapshotId, ShardId shardId, SnapshotsInProgress.ShardSnapshotStatus status)