Class RerouteRequest
- All Implemented Interfaces:
- JsonpSerializable
 It is important to note that after processing any reroute commands
 Elasticsearch will perform rebalancing as normal (respecting the values of
 settings such as cluster.routing.rebalance.enable) in order to
 remain in a balanced state. For example, if the requested allocation includes
 moving a shard from node1 to node2 then this may cause a shard to be moved
 from node2 back to node1 to even things out.
 
 The cluster can be set to disable allocations using the
 cluster.routing.allocation.enable setting. If allocations are
 disabled then the only allocations that will be performed are explicit ones
 given using the reroute command, and consequent allocations due to
 rebalancing.
 
 The cluster will attempt to allocate a shard a maximum of
 index.allocation.max_retries times in a row (defaults to
 5), before giving up and leaving the shard unallocated. This
 scenario can be caused by structural problems such as having an analyzer
 which refers to a stopwords file which doesn’t exist on all nodes.
 
 Once the problem has been corrected, allocation can be manually retried by
 calling the reroute API with the ?retry_failed URI query
 parameter, which will attempt a single retry round for these shards.
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBaseRequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<RerouteRequest>Json deserializer forRerouteRequeststatic final Endpoint<RerouteRequest,RerouteResponse, ErrorResponse> Endpoint "cluster.reroute".
- 
Method SummaryModifier and TypeMethodDescriptioncommands()Defines the commands to perform.final BooleandryRun()If true, then the request simulates the operation.final Booleanexplain()If true, then the response contains an explanation of why the commands can or cannot run.final TimePeriod to wait for a connection to the master node.metric()Limits the information returned to the specified metrics.static RerouteRequestfinal BooleanIf true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Timetimeout()Period to wait for a response.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBasetoString
- 
Field Details- 
_DESERIALIZERJson deserializer forRerouteRequest
- 
_ENDPOINTEndpoint "cluster.reroute".
 
- 
- 
Method Details- 
of
- 
commandsDefines the commands to perform.API name: commands
- 
dryRunIf true, then the request simulates the operation. It will calculate the result of applying the commands to the current cluster state and return the resulting cluster state after the commands (and rebalancing) have been applied; it will not actually perform the requested changes.API name: dry_run
- 
explainIf true, then the response contains an explanation of why the commands can or cannot run.API name: explain
- 
masterTimeoutPeriod to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name: master_timeout
- 
metricLimits the information returned to the specified metrics.API name: metric
- 
retryFailedIf true, then retries allocation of shards that are blocked due to too many subsequent allocation failures.API name: retry_failed
- 
timeoutPeriod to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name: timeout
- 
serializeSerialize this object to JSON.- Specified by:
- serializein interface- JsonpSerializable
 
- 
serializeInternal
- 
setupRerouteRequestDeserializerprotected static void setupRerouteRequestDeserializer(ObjectDeserializer<RerouteRequest.Builder> op) 
 
-