Class AllocateStalePrimaryAllocationCommand
java.lang.Object
org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
org.elasticsearch.cluster.routing.allocation.command.BasePrimaryAllocationCommand
org.elasticsearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand
- All Implemented Interfaces:
 AllocationCommand,NamedWriteable,Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
Allocates an unassigned stale primary shard to a specific node. Use with extreme care as this will result in data loss.
 Allocation deciders are ignored.
- 
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.elasticsearch.common.xcontent.ParseFieldstatic StringFields inherited from class org.elasticsearch.cluster.routing.allocation.command.BasePrimaryAllocationCommand
acceptDataLossFields inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
index, node, shardIdFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS - 
Constructor Summary
ConstructorsConstructorDescriptionAllocateStalePrimaryAllocationCommand(String index, int shardId, String node, boolean acceptDataLoss)Creates a newAllocateStalePrimaryAllocationCommandRead from a stream. - 
Method Summary
Modifier and TypeMethodDescriptionexecute(RoutingAllocation allocation, boolean explain)Executes the command on aRoutingAllocationsetupfromXContent(org.elasticsearch.common.xcontent.XContentParser parser)Returns any feedback the command wants to provide for logging.name()Get the name of the commandMethods inherited from class org.elasticsearch.cluster.routing.allocation.command.BasePrimaryAllocationCommand
acceptDataLoss, createAllocatePrimaryParser, equals, extraXContent, hashCode, writeToMethods inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
createAllocateParser, explainOrThrowMissingRoutingNode, explainOrThrowRejectedCommand, explainOrThrowRejectedCommand, index, initializeUnassignedShard, initializeUnassignedShard, node, shardId, toXContentMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.routing.allocation.command.AllocationCommand
getWriteableNameMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment 
- 
Field Details
- 
NAME
- See Also:
 - Constant Field Values
 
 - 
COMMAND_NAME_FIELD
public static final org.elasticsearch.common.xcontent.ParseField COMMAND_NAME_FIELD 
 - 
 - 
Constructor Details
- 
AllocateStalePrimaryAllocationCommand
public AllocateStalePrimaryAllocationCommand(String index, int shardId, String node, boolean acceptDataLoss)Creates a newAllocateStalePrimaryAllocationCommand- Parameters:
 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 loss
 - 
AllocateStalePrimaryAllocationCommand
Read from a stream.- Throws:
 IOException
 
 - 
 - 
Method Details
- 
name
Description copied from interface:AllocationCommandGet the name of the command- Returns:
 - name of the command
 
 - 
getMessage
Description copied from interface:AllocationCommandReturns any feedback the command wants to provide for logging. This message should be appropriate to expose to the user after the command has been applied - 
fromXContent
public static AllocateStalePrimaryAllocationCommand fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
 IOException
 - 
execute
Description copied from interface:AllocationCommandExecutes the command on aRoutingAllocationsetup- Parameters:
 allocation-RoutingAllocationto modify
 
 -