Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -935,14 +935,49 @@ public CompletableFuture<BulkResponse> bulk() {
// ----- Endpoint: cancel_reindex

/**
* Cancel a reindex task.
* Cancel an ongoing reindex task.
* <p>
* Cancel an ongoing reindex task. If <code>wait_for_completion</code> is
* <code>true</code> (the default), the response contains the final task state
* after cancellation. If <code>wait_for_completion</code> is
* <code>false</code>, the response contains only
* <code>acknowledged: true</code>.
* If <code>wait_for_completion</code> is <code>true</code> (the default), the
* response contains the final task state after cancellation. If
* <code>wait_for_completion</code> is <code>false</code>, the response contains
* only <code>acknowledged: true</code>.
* <p>
* This API follows reindex tasks across node-shutdown relocations, so callers
* can keep using the original task ID throughout the lifetime of the operation.
* Returned task IDs and timings reflect the original task, not its relocated
* successor. Relocated task IDs are also supported. They are followed
* transparently and return the task ID and timings of the original task.
* <p>
* When the task ID cannot be cancelled (unknown ID, non-reindex task, sliced
* child, finished task, or node left with no stored result), the API returns
* the following response with a 404 status code:
*
* <pre>
* <code>{
* &quot;error&quot;: {
* &quot;type&quot;: &quot;resource_not_found_exception&quot;,
* &quot;reason&quot;: &quot;reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed&quot;
* },
* &quot;status&quot;: 404
* }
* </code>
* </pre>
* <p>
* During a brief handoff window of a node-shutdown relocation, you may receive
* the response below with a 503 status code. Retry with the same task ID; the
* retry follows the relocated task transparently.
*
* <pre>
* <code>{
* &quot;error&quot;: {
* &quot;type&quot;: &quot;status_exception&quot;,
* &quot;reason&quot;: &quot;cannot cancel task [36619] because it is being relocated&quot;
* },
* &quot;status&quot;: 503
* }
* </code>
* </pre>
*
* @see <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
* on elastic.co</a>
Expand All @@ -956,14 +991,49 @@ public CompletableFuture<CancelReindexResponse> cancelReindex(CancelReindexReque
}

/**
* Cancel a reindex task.
* Cancel an ongoing reindex task.
* <p>
* If <code>wait_for_completion</code> is <code>true</code> (the default), the
* response contains the final task state after cancellation. If
* <code>wait_for_completion</code> is <code>false</code>, the response contains
* only <code>acknowledged: true</code>.
* <p>
* Cancel an ongoing reindex task. If <code>wait_for_completion</code> is
* <code>true</code> (the default), the response contains the final task state
* after cancellation. If <code>wait_for_completion</code> is
* <code>false</code>, the response contains only
* <code>acknowledged: true</code>.
* This API follows reindex tasks across node-shutdown relocations, so callers
* can keep using the original task ID throughout the lifetime of the operation.
* Returned task IDs and timings reflect the original task, not its relocated
* successor. Relocated task IDs are also supported. They are followed
* transparently and return the task ID and timings of the original task.
* <p>
* When the task ID cannot be cancelled (unknown ID, non-reindex task, sliced
* child, finished task, or node left with no stored result), the API returns
* the following response with a 404 status code:
*
* <pre>
* <code>{
* &quot;error&quot;: {
* &quot;type&quot;: &quot;resource_not_found_exception&quot;,
* &quot;reason&quot;: &quot;reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed&quot;
* },
* &quot;status&quot;: 404
* }
* </code>
* </pre>
* <p>
* During a brief handoff window of a node-shutdown relocation, you may receive
* the response below with a 503 status code. Retry with the same task ID; the
* retry follows the relocated task transparently.
*
* <pre>
* <code>{
* &quot;error&quot;: {
* &quot;type&quot;: &quot;status_exception&quot;,
* &quot;reason&quot;: &quot;cannot cancel task [36619] because it is being relocated&quot;
* },
* &quot;status&quot;: 503
* }
* </code>
* </pre>
*
* @param fn
* a function that initializes a builder to create the
* {@link CancelReindexRequest}
Expand Down Expand Up @@ -2620,10 +2690,31 @@ public final <TDocument> CompletableFuture<GetResponse<TDocument>> get(
// ----- Endpoint: get_reindex

/**
* Get a reindex task.
* <p>
* Get the status and progress of a specific reindex task.
* <p>
* This API follows reindex tasks across node-shutdown relocations, so callers
* can keep using the original task ID throughout the lifetime of the operation.
* Returned task IDs and timings reflect the original task, not its relocated
* successor. Relocated task IDs are also supported. They are followed
* transparently and return the task ID and timings of the original task.
* <p>
* When the task ID cannot be resolved, the API returns the response below with
* a 404 status code. This response is used whether the ID is unknown, refers to
* a non-reindex task, refers to a sliced child subtask, or refers to a task
* whose node left the cluster with no stored result (e.g. a non-graceful
* shutdown).
*
* <pre>
* <code>{
* &quot;error&quot;: {
* &quot;type&quot;: &quot;resource_not_found_exception&quot;,
* &quot;reason&quot;: &quot;Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found&quot;
* },
* &quot;status&quot;: 404
* }
* </code>
* </pre>
*
* @see <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
* on elastic.co</a>
Expand All @@ -2637,10 +2728,31 @@ public CompletableFuture<GetReindexResponse> getReindex(GetReindexRequest reques
}

/**
* Get a reindex task.
* <p>
* Get the status and progress of a specific reindex task.
* <p>
* This API follows reindex tasks across node-shutdown relocations, so callers
* can keep using the original task ID throughout the lifetime of the operation.
* Returned task IDs and timings reflect the original task, not its relocated
* successor. Relocated task IDs are also supported. They are followed
* transparently and return the task ID and timings of the original task.
* <p>
* When the task ID cannot be resolved, the API returns the response below with
* a 404 status code. This response is used whether the ID is unknown, refers to
* a non-reindex task, refers to a sliced child subtask, or refers to a task
* whose node left the cluster with no stored result (e.g. a non-graceful
* shutdown).
*
* <pre>
* <code>{
* &quot;error&quot;: {
* &quot;type&quot;: &quot;resource_not_found_exception&quot;,
* &quot;reason&quot;: &quot;Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found&quot;
* },
* &quot;status&quot;: 404
* }
* </code>
* </pre>
*
* @param fn
* a function that initializes a builder to create the
* {@link GetReindexRequest}
Expand Down Expand Up @@ -3451,9 +3563,16 @@ public CompletableFuture<InfoResponse> info() {
// ----- Endpoint: list_reindex

/**
* List active reindex tasks.
* <p>
* Get information about all currently running reindex tasks.
* <p>
* Reindex tasks that are mid-relocation between nodes are reported once, under
* their original task ID, so callers do not see duplicates across the
* relocation chain.
* <p>
* If the API returns a HTTP status of <code>200 OK</code>, but
* <code>node_failures</code> or <code>task_failures</code> are non-empty in the
* body, the listing is not a complete authoritative listing and may be missing
* tasks.
*
* @see <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
Expand All @@ -3468,9 +3587,16 @@ public CompletableFuture<ListReindexResponse> listReindex(ListReindexRequest req
}

/**
* List active reindex tasks.
* <p>
* Get information about all currently running reindex tasks.
* <p>
* Reindex tasks that are mid-relocation between nodes are reported once, under
* their original task ID, so callers do not see duplicates across the
* relocation chain.
* <p>
* If the API returns a HTTP status of <code>200 OK</code>, but
* <code>node_failures</code> or <code>task_failures</code> are non-empty in the
* body, the listing is not a complete authoritative listing and may be missing
* tasks.
*
* @param fn
* a function that initializes a builder to create the
Expand All @@ -3486,9 +3612,16 @@ public final CompletableFuture<ListReindexResponse> listReindex(
}

/**
* List active reindex tasks.
* <p>
* Get information about all currently running reindex tasks.
* <p>
* Reindex tasks that are mid-relocation between nodes are reported once, under
* their original task ID, so callers do not see duplicates across the
* relocation chain.
* <p>
* If the API returns a HTTP status of <code>200 OK</code>, but
* <code>node_failures</code> or <code>task_failures</code> are non-empty in the
* body, the listing is not a complete authoritative listing and may be missing
* tasks.
*
* @see <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch#TODO">Documentation
Expand Down Expand Up @@ -4366,8 +4499,8 @@ public final CompletableFuture<RankEvalResponse> rankEval(
* cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
* project, only remote hosts from <a href=
* "https://cloud.elastic.co/registration?page=docs&amp;placement=docs-body">Elastic
* Cloud Hosted</a> are allowed. Automatic data stream creation requires a
* matching index template with data stream enabled.
* Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
* stream creation requires a matching index template with data stream enabled.
* <p>
* The <code>dest</code> element can be configured like the index API to control
* optimistic concurrency control. Omitting <code>version_type</code> or setting
Expand Down Expand Up @@ -4463,8 +4596,8 @@ public CompletableFuture<ReindexResponse> reindex(ReindexRequest request) {
* cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless
* project, only remote hosts from <a href=
* "https://cloud.elastic.co/registration?page=docs&amp;placement=docs-body">Elastic
* Cloud Hosted</a> are allowed. Automatic data stream creation requires a
* matching index template with data stream enabled.
* Cloud Hosted and Elastic Cloud Serverless</a> are allowed. Automatic data
* stream creation requires a matching index template with data stream enabled.
* <p>
* The <code>dest</code> element can be configured like the index API to control
* optimistic concurrency control. Omitting <code>version_type</code> or setting
Expand Down Expand Up @@ -4529,17 +4662,32 @@ public final CompletableFuture<ReindexResponse> reindex(
/**
* Throttle a reindex operation.
* <p>
* Change the number of requests per second for a particular reindex operation.
* For example:
* Change the maximum number of documents to index per second for a particular
* reindex operation. For example, to unthrottle to unlimited documents per
* second:
*
* <pre>
* <code>POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
* </code>
* </pre>
* <p>
* Rethrottling that speeds up the query takes effect immediately. Rethrottling
* that slows down the query will take effect after completing the current
* batch. This behavior prevents scroll timeouts.
* that slows down the query will take effect after completing the current batch
* of documents. This behavior prevents scroll timeouts.
* <p>
* This API follows reindex tasks across node-shutdown relocations, so callers
* can keep using the original task ID throughout the lifetime of the operation.
* The relocated task ID is also accepted and is followed transparently. In
* either case, returned task IDs and timings reflect the original task, not its
* relocated successor.
* <p>
* The rethrottle may not have been applied to any tasks if either
* <code>node_failures</code> or <code>task_failures</code> are non-empty, or if
* the response contains no successfully rethrottled tasks — that is, no entries
* under <code>nodes</code> (returned with the default
* <code>group_by=nodes</code> in stack) or under <code>tasks</code> (returned
* in serverless, or in stack with <code>group_by=none</code> or
* <code>group_by=parents</code>).
*
* @see <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex">Documentation
Expand All @@ -4556,17 +4704,32 @@ public CompletableFuture<ReindexRethrottleResponse> reindexRethrottle(ReindexRet
/**
* Throttle a reindex operation.
* <p>
* Change the number of requests per second for a particular reindex operation.
* For example:
* Change the maximum number of documents to index per second for a particular
* reindex operation. For example, to unthrottle to unlimited documents per
* second:
*
* <pre>
* <code>POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
* </code>
* </pre>
* <p>
* Rethrottling that speeds up the query takes effect immediately. Rethrottling
* that slows down the query will take effect after completing the current
* batch. This behavior prevents scroll timeouts.
* that slows down the query will take effect after completing the current batch
* of documents. This behavior prevents scroll timeouts.
* <p>
* This API follows reindex tasks across node-shutdown relocations, so callers
* can keep using the original task ID throughout the lifetime of the operation.
* The relocated task ID is also accepted and is followed transparently. In
* either case, returned task IDs and timings reflect the original task, not its
* relocated successor.
* <p>
* The rethrottle may not have been applied to any tasks if either
* <code>node_failures</code> or <code>task_failures</code> are non-empty, or if
* the response contains no successfully rethrottled tasks — that is, no entries
* under <code>nodes</code> (returned with the default
* <code>group_by=nodes</code> in stack) or under <code>tasks</code> (returned
* in serverless, or in stack with <code>group_by=none</code> or
* <code>group_by=parents</code>).
*
* @param fn
* a function that initializes a builder to create the
Expand Down
Loading
Loading