public class AllocateReplicaAllocationCommand extends AbstractAllocateAllocationCommand
Modifier and Type | Class and Description |
---|---|
protected static class |
AllocateReplicaAllocationCommand.Builder |
AllocationCommand.Parser<T extends AllocationCommand>
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static ParseField |
COMMAND_NAME_FIELD |
static java.lang.String |
NAME |
index, node, shardId
EMPTY_PARAMS
Constructor and Description |
---|
AllocateReplicaAllocationCommand(StreamInput in)
Read from a stream.
|
AllocateReplicaAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node)
Creates a new
AllocateReplicaAllocationCommand |
Modifier and Type | Method and Description |
---|---|
RerouteExplanation |
execute(RoutingAllocation allocation,
boolean explain)
Executes the command on a
RoutingAllocation setup |
static AllocateReplicaAllocationCommand |
fromXContent(XContentParser parser) |
java.lang.String |
name()
Get the name of the command
|
createAllocateParser, equals, explainOrThrowMissingRoutingNode, explainOrThrowRejectedCommand, explainOrThrowRejectedCommand, extraXContent, hashCode, index, initializeUnassignedShard, initializeUnassignedShard, node, shardId, toXContent, writeTo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getWriteableName
isFragment
public static final java.lang.String NAME
public static final ParseField COMMAND_NAME_FIELD
public AllocateReplicaAllocationCommand(java.lang.String index, int shardId, java.lang.String node)
AllocateReplicaAllocationCommand
index
- index of the shard to assignshardId
- id of the shard to assignnode
- node id of the node to assign the shard topublic AllocateReplicaAllocationCommand(StreamInput in) throws java.io.IOException
java.io.IOException
public java.lang.String name()
AllocationCommand
public static AllocateReplicaAllocationCommand fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommand
RoutingAllocation
setupallocation
- RoutingAllocation
to modify