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.Empty
Nested 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, timeout
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
Constructor Summary
-
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.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.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.boolean
boolean
explain()
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 executeint
hashCode()
boolean
Returns the current retry failed flagsetRetryFailed(boolean retryFailed)
Sets the retry failed flag (defaults tofalse
).validate()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
ackTimeout, timeout, timeout, timeout
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toString
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.ack.AckedRequest
masterNodeTimeout
Methods 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:
validate
in classActionRequest
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classAcknowledgedRequest<ClusterRerouteRequest>
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-