public class AllocateStalePrimaryAllocationCommand extends BasePrimaryAllocationCommand
| Modifier and Type | Class and Description |
|---|---|
static class |
AllocateStalePrimaryAllocationCommand.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 |
acceptDataLossindex, node, shardIdEMPTY_PARAMS| Constructor and Description |
|---|
AllocateStalePrimaryAllocationCommand(StreamInput in)
Read from a stream.
|
AllocateStalePrimaryAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node,
boolean acceptDataLoss)
Creates a new
AllocateStalePrimaryAllocationCommand |
| Modifier and Type | Method and Description |
|---|---|
RerouteExplanation |
execute(RoutingAllocation allocation,
boolean explain)
Executes the command on a
RoutingAllocation setup |
static AllocateStalePrimaryAllocationCommand |
fromXContent(XContentParser parser) |
java.lang.String |
name()
Get the name of the command
|
acceptDataLoss, createAllocatePrimaryParser, equals, extraXContent, hashCode, writeTocreateAllocateParser, explainOrThrowMissingRoutingNode, explainOrThrowRejectedCommand, explainOrThrowRejectedCommand, index, initializeUnassignedShard, initializeUnassignedShard, node, shardId, toXContentclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetWriteableNameisFragmentpublic static final java.lang.String NAME
public static final ParseField COMMAND_NAME_FIELD
public AllocateStalePrimaryAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node,
boolean acceptDataLoss)
AllocateStalePrimaryAllocationCommandindex - index of the shard to assignshardId - id of the shard to assignnode - node id of the node to assign the shard toacceptDataLoss - whether the user agrees to data losspublic AllocateStalePrimaryAllocationCommand(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String name()
AllocationCommandpublic static AllocateStalePrimaryAllocationCommand fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommandRoutingAllocation setupallocation - RoutingAllocation to modify