AllocationCommand, NamedWriteable, Writeable, ToXContent, ToXContentObjectpublic class AllocateEmptyPrimaryAllocationCommand extends BasePrimaryAllocationCommand
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AllocateEmptyPrimaryAllocationCommand.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, shardIdacceptDataLossEMPTY_PARAMS| Constructor | Description |
|---|---|
AllocateEmptyPrimaryAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node,
boolean acceptDataLoss) |
Creates a new
AllocateEmptyPrimaryAllocationCommand |
AllocateEmptyPrimaryAllocationCommand(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 AllocateEmptyPrimaryAllocationCommand |
fromXContent(XContentParser parser) |
|
java.util.Optional<java.lang.String> |
getMessage() |
Returns any feedback the command wants to provide for logging.
|
java.lang.String |
name() |
Get the name of the command
|
createAllocateParser, explainOrThrowMissingRoutingNode, explainOrThrowRejectedCommand, explainOrThrowRejectedCommand, index, initializeUnassignedShard, initializeUnassignedShard, node, shardId, toXContentgetWriteableNameacceptDataLoss, createAllocatePrimaryParser, equals, extraXContent, hashCode, writeToclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisFragmentpublic static final java.lang.String NAME
public static final ParseField COMMAND_NAME_FIELD
public AllocateEmptyPrimaryAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node,
boolean acceptDataLoss)
AllocateEmptyPrimaryAllocationCommandshardId - ShardId of the shard to assignnode - node id of the node to assign the shard toacceptDataLoss - whether the user agrees to data losspublic AllocateEmptyPrimaryAllocationCommand(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String name()
AllocationCommandpublic java.util.Optional<java.lang.String> getMessage()
AllocationCommandpublic static AllocateEmptyPrimaryAllocationCommand fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommandRoutingAllocation setupallocation - RoutingAllocation to modify