public abstract class AbstractAllocateAllocationCommand extends java.lang.Object implements AllocationCommand
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractAllocateAllocationCommand.Builder<T extends AbstractAllocateAllocationCommand>
Works around ObjectParser not supporting constructor arguments.
|
AllocationCommand.Parser<T extends AllocationCommand>Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
index |
protected java.lang.String |
node |
protected int |
shardId |
EMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAllocateAllocationCommand(StreamInput in)
Read from a stream.
|
protected |
AbstractAllocateAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node) |
| Modifier and Type | Method and Description |
|---|---|
protected static <T extends AbstractAllocateAllocationCommand.Builder<?>> |
createAllocateParser(java.lang.String command) |
boolean |
equals(java.lang.Object obj) |
protected RerouteExplanation |
explainOrThrowMissingRoutingNode(RoutingAllocation allocation,
boolean explain,
DiscoveryNode discoNode)
Handle case where a disco node cannot be found in the routing table.
|
protected RerouteExplanation |
explainOrThrowRejectedCommand(boolean explain,
RoutingAllocation allocation,
java.lang.RuntimeException rte)
Utility method for rejecting the current allocation command based on provided exception
|
protected RerouteExplanation |
explainOrThrowRejectedCommand(boolean explain,
RoutingAllocation allocation,
java.lang.String reason)
Utility method for rejecting the current allocation command based on provided reason
|
protected void |
extraXContent(XContentBuilder builder) |
int |
hashCode() |
java.lang.String |
index()
Get the index name
|
protected void |
initializeUnassignedShard(RoutingAllocation allocation,
RoutingNodes routingNodes,
RoutingNode routingNode,
ShardRouting shardRouting)
Initializes an unassigned shard on a node and removes it from the unassigned
|
protected void |
initializeUnassignedShard(RoutingAllocation allocation,
RoutingNodes routingNodes,
RoutingNode routingNode,
ShardRouting shardRouting,
UnassignedInfo unassignedInfo,
RecoverySource recoverySource)
Initializes an unassigned shard on a node and removes it from the unassigned
|
java.lang.String |
node()
Get the id of the node
|
int |
shardId()
Get the shard id
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitexecute, getWriteableName, nameisFragmentprotected final java.lang.String index
protected final int shardId
protected final java.lang.String node
protected AbstractAllocateAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node)
protected AbstractAllocateAllocationCommand(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected static <T extends AbstractAllocateAllocationCommand.Builder<?>> ObjectParser<T,java.lang.Void> createAllocateParser(java.lang.String command)
public void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic java.lang.String index()
public int shardId()
public java.lang.String node()
protected RerouteExplanation explainOrThrowMissingRoutingNode(RoutingAllocation allocation, boolean explain, DiscoveryNode discoNode)
protected RerouteExplanation explainOrThrowRejectedCommand(boolean explain, RoutingAllocation allocation, java.lang.String reason)
protected RerouteExplanation explainOrThrowRejectedCommand(boolean explain, RoutingAllocation allocation, java.lang.RuntimeException rte)
protected void initializeUnassignedShard(RoutingAllocation allocation, RoutingNodes routingNodes, RoutingNode routingNode, ShardRouting shardRouting)
allocation - the allocationroutingNodes - the routing nodesroutingNode - the node to initialize it toshardRouting - the shard routing that is to be matched in unassigned shardsprotected void initializeUnassignedShard(RoutingAllocation allocation, RoutingNodes routingNodes, RoutingNode routingNode, ShardRouting shardRouting, @Nullable UnassignedInfo unassignedInfo, @Nullable RecoverySource recoverySource)
allocation - the allocationroutingNodes - the routing nodesroutingNode - the node to initialize it toshardRouting - the shard routing that is to be matched in unassigned shardsunassignedInfo - unassigned info to overriderecoverySource - recovery source to overridepublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionprotected void extraXContent(XContentBuilder builder) throws java.io.IOException
java.io.IOExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object