public class AllocateStalePrimaryAllocationCommand extends BasePrimaryAllocationCommand
Modifier and Type | Class and Description |
---|---|
static class |
AllocateStalePrimaryAllocationCommand.Builder |
static class |
AllocateStalePrimaryAllocationCommand.Factory |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
acceptDataLoss
index, node, shardId
EMPTY_PARAMS
Constructor and Description |
---|
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 |
java.lang.String |
name()
Get the name of the command
|
acceptDataLoss, createAllocatePrimaryParser, toXContent, writeTo
createAllocateParser, explainOrThrowMissingRoutingNode, explainOrThrowRejectedCommand, explainOrThrowRejectedCommand, index, initializeUnassignedShard, initializeUnassignedShard, node, shardId
public static final java.lang.String NAME
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 java.lang.String name()
AllocationCommand
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommand
RoutingAllocation
setupallocation
- RoutingAllocation
to modify