AllocationCommand, NamedWriteable, Writeable, ToXContent, ToXContentObjectpublic class AllocateReplicaAllocationCommand extends AbstractAllocateAllocationCommand
| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
AllocateReplicaAllocationCommand.Builder |
AllocationCommand.Parser<T extends AllocationCommand>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static ParseField |
COMMAND_NAME_FIELD |
|
static java.lang.String |
NAME |
index, node, shardIdEMPTY_PARAMS| Constructor | Description |
|---|---|
AllocateReplicaAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node) |
Creates a new
AllocateReplicaAllocationCommand |
AllocateReplicaAllocationCommand(StreamInput in) |
Read from a stream.
|
| Modifier and Type | Method | 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, writeTogetMessage, getWriteableNameclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisFragmentpublic 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)
AllocateReplicaAllocationCommandindex - 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.IOExceptionpublic java.lang.String name()
AllocationCommandpublic static AllocateReplicaAllocationCommand fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommandRoutingAllocation setupallocation - RoutingAllocation to modify