Module org.elasticsearch.server
Class AllocateReplicaAllocationCommand
java.lang.Object
org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
org.elasticsearch.cluster.routing.allocation.command.AllocateReplicaAllocationCommand
- All Implemented Interfaces:
AllocationCommand,NamedWriteable,Writeable,ToXContent,ToXContentObject
Allocates an unassigned replica shard to a specific node. Checks if allocation deciders allow allocation.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
index, node, shardIdFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionAllocateReplicaAllocationCommand(String index, int shardId, String node) Creates a newAllocateReplicaAllocationCommandRead from a stream. -
Method Summary
Modifier and TypeMethodDescriptionexecute(RoutingAllocation allocation, boolean explain) Executes the command on aRoutingAllocationsetupfromXContent(XContentParser parser) name()Get the name of the commandMethods inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
createAllocateParser, equals, explainOrThrowMissingRoutingNode, explainOrThrowRejectedCommand, explainOrThrowRejectedCommand, extraXContent, hashCode, index, initializeUnassignedShard, initializeUnassignedShard, node, shardId, toXContent, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.routing.allocation.command.AllocationCommand
getMessage, getWriteableNameMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
-
COMMAND_NAME_FIELD
-
-
Constructor Details
-
AllocateReplicaAllocationCommand
Creates a newAllocateReplicaAllocationCommand- Parameters:
index- index of the shard to assignshardId- id of the shard to assignnode- node id of the node to assign the shard to
-
AllocateReplicaAllocationCommand
Read from a stream.- Throws:
IOException
-
-
Method Details
-
name
Description copied from interface:AllocationCommandGet the name of the command- Returns:
- name of the command
-
fromXContent
public static AllocateReplicaAllocationCommand fromXContent(XContentParser parser) throws IOException - Throws:
IOException
-
execute
Description copied from interface:AllocationCommandExecutes the command on aRoutingAllocationsetup- Parameters:
allocation-RoutingAllocationto modify
-