AllocationCommand
, NamedWriteable
, Writeable
, ToXContent
, ToXContentObject
public class AllocateStalePrimaryAllocationCommand extends BasePrimaryAllocationCommand
Modifier and Type | Class | Description |
---|---|---|
static class |
AllocateStalePrimaryAllocationCommand.Builder |
AllocationCommand.Parser<T extends AllocationCommand>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static ParseField |
COMMAND_NAME_FIELD |
|
static java.lang.String |
NAME |
index, node, shardId
acceptDataLoss
EMPTY_PARAMS
Constructor | Description |
---|---|
AllocateStalePrimaryAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node,
boolean acceptDataLoss) |
Creates a new
AllocateStalePrimaryAllocationCommand |
AllocateStalePrimaryAllocationCommand(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 AllocateStalePrimaryAllocationCommand |
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, toXContent
getWriteableName
acceptDataLoss, createAllocatePrimaryParser, equals, extraXContent, hashCode, writeTo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFragment
public 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)
AllocateStalePrimaryAllocationCommand
index
- 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.IOException
public java.lang.String name()
AllocationCommand
public java.util.Optional<java.lang.String> getMessage()
AllocationCommand
public static AllocateStalePrimaryAllocationCommand fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommand
RoutingAllocation
setupallocation
- RoutingAllocation
to modify