Package org.opensearch.cluster
Class SnapshotsInProgress
java.lang.Object
org.opensearch.cluster.AbstractNamedDiffable<ClusterState.Custom>
org.opensearch.cluster.SnapshotsInProgress
- All Implemented Interfaces:
ClusterState.Custom
,ClusterState.FeatureAware
,Diffable<ClusterState.Custom>
,NamedDiffable<ClusterState.Custom>
,org.opensearch.core.common.io.stream.NamedWriteable
,org.opensearch.core.common.io.stream.VersionedNamedWriteable
,org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentFragment
public class SnapshotsInProgress
extends AbstractNamedDiffable<ClusterState.Custom>
implements ClusterState.Custom
Meta data about snapshots that are currently executing
- Opensearch.internal:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Entry in the collection.static class
Status of shard snapshots.static enum
The shard state.static enum
State of the snapshots.Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final SnapshotsInProgress
static final String
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if all shards in the list have completedentries()
boolean
org.opensearch.Version
int
hashCode()
static SnapshotsInProgress
of
(List<SnapshotsInProgress.Entry> entries) static NamedDiff
<ClusterState.Custom> readDiffFrom
(org.opensearch.core.common.io.stream.StreamInput in) static SnapshotsInProgress.Entry
startClone
(Snapshot snapshot, SnapshotId source, List<IndexId> indices, long startTime, long repositoryStateId, org.opensearch.Version version) Creates the initial snapshot clone entrystatic SnapshotsInProgress.Entry
startedEntry
(Snapshot snapshot, boolean includeGlobalState, boolean partial, List<IndexId> indices, List<String> dataStreams, long startTime, long repositoryStateId, Map<org.opensearch.core.index.shard.ShardId, SnapshotsInProgress.ShardSnapshotStatus> shards, Map<String, Object> userMetadata, org.opensearch.Version version, boolean remoteStoreIndexShallowCopy) Creates the initialSnapshotsInProgress.Entry
when starting a snapshot, if no shard-level snapshot work is to be done the resulting entry will be in stateSnapshotsInProgress.State.SUCCESS
right away otherwise it will be in stateSnapshotsInProgress.State.STARTED
.toString()
org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class org.opensearch.cluster.AbstractNamedDiffable
diff, get, readDiffFrom
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.cluster.ClusterState.Custom
isPrivate
Methods inherited from interface org.opensearch.cluster.ClusterState.FeatureAware
getRequiredFeature
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Field Details
-
EMPTY
-
TYPE
- See Also:
-
ABORTED_FAILURE_TEXT
- See Also:
-
-
Constructor Details
-
SnapshotsInProgress
- Throws:
IOException
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
startedEntry
public static SnapshotsInProgress.Entry startedEntry(Snapshot snapshot, boolean includeGlobalState, boolean partial, List<IndexId> indices, List<String> dataStreams, long startTime, long repositoryStateId, Map<org.opensearch.core.index.shard.ShardId, SnapshotsInProgress.ShardSnapshotStatus> shards, Map<String, Object> userMetadata, org.opensearch.Version version, boolean remoteStoreIndexShallowCopy) Creates the initialSnapshotsInProgress.Entry
when starting a snapshot, if no shard-level snapshot work is to be done the resulting entry will be in stateSnapshotsInProgress.State.SUCCESS
right away otherwise it will be in stateSnapshotsInProgress.State.STARTED
. -
startClone
public static SnapshotsInProgress.Entry startClone(Snapshot snapshot, SnapshotId source, List<IndexId> indices, long startTime, long repositoryStateId, org.opensearch.Version version) Creates the initial snapshot clone entry- Parameters:
snapshot
- snapshot to clone intosource
- snapshot to clone fromindices
- indices to clonestartTime
- start timerepositoryStateId
- repository state id that this clone is based onversion
- repository metadata version to write- Returns:
- snapshot clone entry
-
completed
Checks if all shards in the list have completed- Parameters:
shards
- list of shard statuses- Returns:
- true if all shards have completed (either successfully or failed), false otherwise
-
of
-
entries
-
snapshot
-
getWriteableName
- Specified by:
getWriteableName
in interfaceorg.opensearch.core.common.io.stream.NamedWriteable
- Specified by:
getWriteableName
in interfaceorg.opensearch.core.common.io.stream.VersionedNamedWriteable
-
getMinimalSupportedVersion
public org.opensearch.Version getMinimalSupportedVersion()- Specified by:
getMinimalSupportedVersion
in interfaceorg.opensearch.core.common.io.stream.VersionedNamedWriteable
-
readDiffFrom
public static NamedDiff<ClusterState.Custom> readDiffFrom(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-