Class Command
java.lang.Object
org.opensearch.client.opensearch.cluster.reroute.Command
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,ToCopyableBuilder<Command.Builder,Command>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class Command
extends Object
implements PlainJsonSerializable, ToCopyableBuilder<Command.Builder,Command>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<Command> Json deserializer forCommand -
Method Summary
Modifier and TypeMethodDescriptionAllocate an empty primary shard to a node.Allocate an unassigned replica shard to a node.Allocate a primary shard to a node that holds a stale copy.static Command.Builderbuilder()final CommandCancelActioncancel()Cancel allocation of a shard (or recovery).booleaninthashCode()final CommandMoveActionmove()Move a started shard from one node to another node.static Commandvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forCommand
-
-
Method Details
-
of
-
allocateEmptyPrimary
Allocate an empty primary shard to a node. Acceptsindexandshardfor index name and shard number, andnodeto allocate the shard to. Using this command leads to a complete loss of all data that was indexed into this shard, if it was previously started. If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flagaccept_data_lossto be explicitly set to true.API name:
allocate_empty_primary -
allocateReplica
Allocate an unassigned replica shard to a node. Acceptsindexandshardfor index name and shard number, andnodeto allocate the shard to. Takes allocation deciders into account.API name:
allocate_replica -
allocateStalePrimary
Allocate a primary shard to a node that holds a stale copy. Acceptsindexandshardfor index name and shard number, andnodeto allocate the shard to. Using this command may lead to data loss for the provided shard id. If a node which has the good copy of the data rejoins the cluster later on, that data will be deleted or overwritten with the data of the stale copy that was forcefully allocated with this command. To ensure that these implications are well-understood, this command requires the flagaccept_data_lossto be explicitly set to true.API name:
allocate_stale_primary -
cancel
Cancel allocation of a shard (or recovery). Acceptsindexandshardfor index name and shard number, andnodefor the node to cancel the shard allocation on. This can be used to force resynchronization of existing replicas from the primary shard by cancelling them and allowing them to be reinitialized through the standard recovery process. By default only replica shard allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then theallow_primaryflag must also be included in the request.API name:
cancel -
move
Move a started shard from one node to another node. Acceptsindexandshardfor index name and shard number,from_nodefor the node to move the shard from, andto_nodefor the node to move the shard to.API name:
move -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Command.Builder,Command> - Returns:
- a new builder instance.
-
builder
-
setupCommandDeserializer
-
hashCode
public int hashCode() -
equals
-