Class AllocateReplicaAllocationCommand
org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
org.elasticsearch.cluster.routing.allocation.command.AllocateReplicaAllocationCommand
- All Implemented Interfaces:
AllocationCommand
,NamedWriteable
,Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
Allocates an unassigned replica shard to a specific node. Checks if allocation deciders allow allocation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic org.elasticsearch.common.xcontent.ParseField
static
Fields inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
index, node, shardId
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionindex, int shardId, node)
Creates a newAllocateReplicaAllocationCommand
Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionexecute(RoutingAllocation allocation, boolean explain)
Executes the command on aRoutingAllocation
setupfromXContent(org.elasticsearch.common.xcontent.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, writeTo
Methods inherited from class java.lang.
, , , , , , , ,
Methods inherited from interface org.elasticsearch.cluster.routing.allocation.command.AllocationCommand
getMessage, getWriteableName
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
public static final NAME- See Also:
- Constant Field Values
-
COMMAND_NAME_FIELD
public static final org.elasticsearch.common.xcontent.ParseField COMMAND_NAME_FIELD
-
-
Constructor Details
-
AllocateReplicaAllocationCommand
public AllocateReplicaAllocationCommand( index, int shardId, node)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:
-
-
Method Details
-
name
public name()Description copied from interface:AllocationCommand
Get the name of the command- Returns:
- name of the command
-
fromXContent
public static AllocateReplicaAllocationCommand fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws- Throws:
-
execute
Description copied from interface:AllocationCommand
Executes the command on aRoutingAllocation
setup- Parameters:
allocation
-RoutingAllocation
to modify
-