Class ClusterRerouteRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<Request>
org.elasticsearch.action.support.master.AcknowledgedRequest<ClusterRerouteRequest>
org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteRequest
- All Implemented Interfaces:
AckedRequest,Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest
Request to submit cluster reroute allocation commands
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
DEFAULT_ACK_TIMEOUT, timeoutFields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(AllocationCommand... commands)Adds allocation commands to be applied to the cluster.commands(AllocationCommands commands)Set the allocation commands to execute.booleandryRun()Returns the current dry run flag which allows to run the commands without actually applying them, just to get back the resulting cluster state back.dryRun(boolean dryRun)Sets a dry run flag (defaults tofalse) allowing to run the commands without actually applying them to the cluster state, and getting the resulting cluster state back.booleanbooleanexplain()Returns the current explain flagexplain(boolean explain)Sets the explain flag, which will collect information about the reroute request without executing the actions.Returns the allocation commands to executeinthashCode()booleanReturns the current retry failed flagsetRetryFailed(boolean retryFailed)Sets the retry failed flag (defaults tofalse).validate()voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
ackTimeout, timeout, timeout, timeoutMethods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.ack.AckedRequest
masterNodeTimeoutMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
ClusterRerouteRequest
- Throws:
IOException
-
ClusterRerouteRequest
public ClusterRerouteRequest()
-
-
Method Details
-
add
Adds allocation commands to be applied to the cluster. Note, can be empty, in which case will simply run a simple "reroute". -
dryRun
Sets a dry run flag (defaults tofalse) allowing to run the commands without actually applying them to the cluster state, and getting the resulting cluster state back. -
dryRun
public boolean dryRun()Returns the current dry run flag which allows to run the commands without actually applying them, just to get back the resulting cluster state back. -
explain
Sets the explain flag, which will collect information about the reroute request without executing the actions. Similar to dryRun, but human-readable. -
setRetryFailed
Sets the retry failed flag (defaults tofalse). If true, the request will retry allocating shards that can't currently be allocated due to too many allocation failures. -
explain
public boolean explain()Returns the current explain flag -
isRetryFailed
public boolean isRetryFailed()Returns the current retry failed flag -
commands
Set the allocation commands to execute. -
getCommands
Returns the allocation commands to execute -
validate
- Specified by:
validatein classActionRequest
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAcknowledgedRequest<ClusterRerouteRequest>- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-