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 @@ -116,6 +116,7 @@
import co.elastic.clients.elasticsearch.core.UpdateRequest;
import co.elastic.clients.elasticsearch.core.UpdateResponse;
import co.elastic.clients.elasticsearch.dangling_indices.ElasticsearchDanglingIndicesAsyncClient;
import co.elastic.clients.elasticsearch.encryption.ElasticsearchEncryptionAsyncClient;
import co.elastic.clients.elasticsearch.enrich.ElasticsearchEnrichAsyncClient;
import co.elastic.clients.elasticsearch.eql.ElasticsearchEqlAsyncClient;
import co.elastic.clients.elasticsearch.esql.ElasticsearchEsqlAsyncClient;
Expand Down Expand Up @@ -246,6 +247,10 @@ public ElasticsearchDanglingIndicesAsyncClient danglingIndices() {
return new ElasticsearchDanglingIndicesAsyncClient(this.transport, this.transportOptions);
}

public ElasticsearchEncryptionAsyncClient encryption() {
return new ElasticsearchEncryptionAsyncClient(this.transport, this.transportOptions);
}

public ElasticsearchEnrichAsyncClient enrich() {
return new ElasticsearchEnrichAsyncClient(this.transport, this.transportOptions);
}
Expand Down Expand Up @@ -537,12 +542,6 @@ public ElasticsearchXpackAsyncClient xpack() {
* NOTE: Data streams do not support custom routing unless they were created
* with the <code>allow_custom_routing</code> setting enabled in the template.
* <p>
* <strong>Wait for active shards</strong>
* <p>
* When making bulk calls, you can set the <code>wait_for_active_shards</code>
* parameter to require a minimum number of shard copies to be active before
* starting to process the bulk request.
* <p>
* <strong>Refresh</strong>
* <p>
* Control when the changes made by this request are visible to search.
Expand Down Expand Up @@ -719,12 +718,6 @@ public CompletableFuture<BulkResponse> bulk(BulkRequest request) {
* NOTE: Data streams do not support custom routing unless they were created
* with the <code>allow_custom_routing</code> setting enabled in the template.
* <p>
* <strong>Wait for active shards</strong>
* <p>
* When making bulk calls, you can set the <code>wait_for_active_shards</code>
* parameter to require a minimum number of shard copies to be active before
* starting to process the bulk request.
* <p>
* <strong>Refresh</strong>
* <p>
* Control when the changes made by this request are visible to search.
Expand Down Expand Up @@ -901,12 +894,6 @@ public final CompletableFuture<BulkResponse> bulk(Function<BulkRequest.Builder,
* NOTE: Data streams do not support custom routing unless they were created
* with the <code>allow_custom_routing</code> setting enabled in the template.
* <p>
* <strong>Wait for active shards</strong>
* <p>
* When making bulk calls, you can set the <code>wait_for_active_shards</code>
* parameter to require a minimum number of shard copies to be active before
* starting to process the bulk request.
* <p>
* <strong>Refresh</strong>
* <p>
* Control when the changes made by this request are visible to search.
Expand Down Expand Up @@ -3151,7 +3138,8 @@ public CompletableFuture<HealthReportResponse> healthReport() {
* <p>
* NOTE: Replica shards might not all be started when an indexing operation
* returns successfully. By default, only the primary is required. Set
* <code>wait_for_active_shards</code> to change this default behavior.
* <code>wait_for_active_shards</code> to change this default behavior (this
* parameter is not available in Elasticsearch Serverless).
* <p>
* <strong>Automatically create data streams and indices</strong>
* <p>
Expand Down Expand Up @@ -3227,7 +3215,8 @@ public CompletableFuture<HealthReportResponse> healthReport() {
* <code>1</code>). This default can be overridden in the index settings
* dynamically by setting <code>index.write.wait_for_active_shards</code>. To
* alter this behavior per operation, use the
* <code>wait_for_active_shards request</code> parameter.
* <code>wait_for_active_shards request</code> parameter (this parameter is not
* available in Elasticsearch Serverless).
* <p>
* Valid values are all or any positive integer up to the total number of
* configured copies per shard in the index (which is
Expand Down Expand Up @@ -3360,7 +3349,8 @@ public <TDocument> CompletableFuture<IndexResponse> index(IndexRequest<TDocument
* <p>
* NOTE: Replica shards might not all be started when an indexing operation
* returns successfully. By default, only the primary is required. Set
* <code>wait_for_active_shards</code> to change this default behavior.
* <code>wait_for_active_shards</code> to change this default behavior (this
* parameter is not available in Elasticsearch Serverless).
* <p>
* <strong>Automatically create data streams and indices</strong>
* <p>
Expand Down Expand Up @@ -3436,7 +3426,8 @@ public <TDocument> CompletableFuture<IndexResponse> index(IndexRequest<TDocument
* <code>1</code>). This default can be overridden in the index settings
* dynamically by setting <code>index.write.wait_for_active_shards</code>. To
* alter this behavior per operation, use the
* <code>wait_for_active_shards request</code> parameter.
* <code>wait_for_active_shards request</code> parameter (this parameter is not
* available in Elasticsearch Serverless).
* <p>
* Valid values are all or any positive integer up to the total number of
* configured copies per shard in the index (which is
Expand Down Expand Up @@ -6559,19 +6550,6 @@ public final <TDocument, TPartialDocument> CompletableFuture<UpdateResponse<TDoc
* you can use to cancel or get the status of the task. Elasticsearch creates a
* record of this task as a document at <code>.tasks/task/${taskId}</code>.
* <p>
* <strong>Waiting for active shards</strong>
* <p>
* <code>wait_for_active_shards</code> controls how many copies of a shard must
* be active before proceeding with the request. See <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards"><code>wait_for_active_shards</code></a>
* for details. <code>timeout</code> controls how long each write request waits
* for unavailable shards to become available. Both work exactly the way they
* work in the <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk">Bulk
* API</a>. Update by query uses scrolled searches, so you can also specify the
* <code>scroll</code> parameter to control how long it keeps the search context
* alive, for example <code>?scroll=10m</code>. The default is 5 minutes.
* <p>
* <strong>Throttling update requests</strong>
* <p>
* To control the rate at which update by query issues batches of update
Expand Down Expand Up @@ -6721,19 +6699,6 @@ public CompletableFuture<UpdateByQueryResponse> updateByQuery(UpdateByQueryReque
* you can use to cancel or get the status of the task. Elasticsearch creates a
* record of this task as a document at <code>.tasks/task/${taskId}</code>.
* <p>
* <strong>Waiting for active shards</strong>
* <p>
* <code>wait_for_active_shards</code> controls how many copies of a shard must
* be active before proceeding with the request. See <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards"><code>wait_for_active_shards</code></a>
* for details. <code>timeout</code> controls how long each write request waits
* for unavailable shards to become available. Both work exactly the way they
* work in the <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk">Bulk
* API</a>. Update by query uses scrolled searches, so you can also specify the
* <code>scroll</code> parameter to control how long it keeps the search context
* alive, for example <code>?scroll=10m</code>. The default is 5 minutes.
* <p>
* <strong>Throttling update requests</strong>
* <p>
* To control the rate at which update by query issues batches of update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
import co.elastic.clients.elasticsearch.core.UpdateRequest;
import co.elastic.clients.elasticsearch.core.UpdateResponse;
import co.elastic.clients.elasticsearch.dangling_indices.ElasticsearchDanglingIndicesClient;
import co.elastic.clients.elasticsearch.encryption.ElasticsearchEncryptionClient;
import co.elastic.clients.elasticsearch.enrich.ElasticsearchEnrichClient;
import co.elastic.clients.elasticsearch.eql.ElasticsearchEqlClient;
import co.elastic.clients.elasticsearch.esql.ElasticsearchEsqlClient;
Expand Down Expand Up @@ -246,6 +247,10 @@ public ElasticsearchDanglingIndicesClient danglingIndices() {
return new ElasticsearchDanglingIndicesClient(this.transport, this.transportOptions);
}

public ElasticsearchEncryptionClient encryption() {
return new ElasticsearchEncryptionClient(this.transport, this.transportOptions);
}

public ElasticsearchEnrichClient enrich() {
return new ElasticsearchEnrichClient(this.transport, this.transportOptions);
}
Expand Down Expand Up @@ -537,12 +542,6 @@ public ElasticsearchXpackClient xpack() {
* NOTE: Data streams do not support custom routing unless they were created
* with the <code>allow_custom_routing</code> setting enabled in the template.
* <p>
* <strong>Wait for active shards</strong>
* <p>
* When making bulk calls, you can set the <code>wait_for_active_shards</code>
* parameter to require a minimum number of shard copies to be active before
* starting to process the bulk request.
* <p>
* <strong>Refresh</strong>
* <p>
* Control when the changes made by this request are visible to search.
Expand Down Expand Up @@ -719,12 +718,6 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE
* NOTE: Data streams do not support custom routing unless they were created
* with the <code>allow_custom_routing</code> setting enabled in the template.
* <p>
* <strong>Wait for active shards</strong>
* <p>
* When making bulk calls, you can set the <code>wait_for_active_shards</code>
* parameter to require a minimum number of shard copies to be active before
* starting to process the bulk request.
* <p>
* <strong>Refresh</strong>
* <p>
* Control when the changes made by this request are visible to search.
Expand Down Expand Up @@ -902,12 +895,6 @@ public final BulkResponse bulk(Function<BulkRequest.Builder, ObjectBuilder<BulkR
* NOTE: Data streams do not support custom routing unless they were created
* with the <code>allow_custom_routing</code> setting enabled in the template.
* <p>
* <strong>Wait for active shards</strong>
* <p>
* When making bulk calls, you can set the <code>wait_for_active_shards</code>
* parameter to require a minimum number of shard copies to be active before
* starting to process the bulk request.
* <p>
* <strong>Refresh</strong>
* <p>
* Control when the changes made by this request are visible to search.
Expand Down Expand Up @@ -3172,7 +3159,8 @@ public HealthReportResponse healthReport() throws IOException, ElasticsearchExce
* <p>
* NOTE: Replica shards might not all be started when an indexing operation
* returns successfully. By default, only the primary is required. Set
* <code>wait_for_active_shards</code> to change this default behavior.
* <code>wait_for_active_shards</code> to change this default behavior (this
* parameter is not available in Elasticsearch Serverless).
* <p>
* <strong>Automatically create data streams and indices</strong>
* <p>
Expand Down Expand Up @@ -3248,7 +3236,8 @@ public HealthReportResponse healthReport() throws IOException, ElasticsearchExce
* <code>1</code>). This default can be overridden in the index settings
* dynamically by setting <code>index.write.wait_for_active_shards</code>. To
* alter this behavior per operation, use the
* <code>wait_for_active_shards request</code> parameter.
* <code>wait_for_active_shards request</code> parameter (this parameter is not
* available in Elasticsearch Serverless).
* <p>
* Valid values are all or any positive integer up to the total number of
* configured copies per shard in the index (which is
Expand Down Expand Up @@ -3381,7 +3370,8 @@ public <TDocument> IndexResponse index(IndexRequest<TDocument> request) throws I
* <p>
* NOTE: Replica shards might not all be started when an indexing operation
* returns successfully. By default, only the primary is required. Set
* <code>wait_for_active_shards</code> to change this default behavior.
* <code>wait_for_active_shards</code> to change this default behavior (this
* parameter is not available in Elasticsearch Serverless).
* <p>
* <strong>Automatically create data streams and indices</strong>
* <p>
Expand Down Expand Up @@ -3457,7 +3447,8 @@ public <TDocument> IndexResponse index(IndexRequest<TDocument> request) throws I
* <code>1</code>). This default can be overridden in the index settings
* dynamically by setting <code>index.write.wait_for_active_shards</code>. To
* alter this behavior per operation, use the
* <code>wait_for_active_shards request</code> parameter.
* <code>wait_for_active_shards request</code> parameter (this parameter is not
* available in Elasticsearch Serverless).
* <p>
* Valid values are all or any positive integer up to the total number of
* configured copies per shard in the index (which is
Expand Down Expand Up @@ -6611,19 +6602,6 @@ public final <TDocument, TPartialDocument> UpdateResponse<TDocument> update(
* you can use to cancel or get the status of the task. Elasticsearch creates a
* record of this task as a document at <code>.tasks/task/${taskId}</code>.
* <p>
* <strong>Waiting for active shards</strong>
* <p>
* <code>wait_for_active_shards</code> controls how many copies of a shard must
* be active before proceeding with the request. See <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards"><code>wait_for_active_shards</code></a>
* for details. <code>timeout</code> controls how long each write request waits
* for unavailable shards to become available. Both work exactly the way they
* work in the <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk">Bulk
* API</a>. Update by query uses scrolled searches, so you can also specify the
* <code>scroll</code> parameter to control how long it keeps the search context
* alive, for example <code>?scroll=10m</code>. The default is 5 minutes.
* <p>
* <strong>Throttling update requests</strong>
* <p>
* To control the rate at which update by query issues batches of update
Expand Down Expand Up @@ -6774,19 +6752,6 @@ public UpdateByQueryResponse updateByQuery(UpdateByQueryRequest request)
* you can use to cancel or get the status of the task. Elasticsearch creates a
* record of this task as a document at <code>.tasks/task/${taskId}</code>.
* <p>
* <strong>Waiting for active shards</strong>
* <p>
* <code>wait_for_active_shards</code> controls how many copies of a shard must
* be active before proceeding with the request. See <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards"><code>wait_for_active_shards</code></a>
* for details. <code>timeout</code> controls how long each write request waits
* for unavailable shards to become available. Both work exactly the way they
* work in the <a href=
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk">Bulk
* API</a>. Update by query uses scrolled searches, so you can also specify the
* <code>scroll</code> parameter to control how long it keeps the search context
* alive, for example <code>?scroll=10m</code>. The default is 5 minutes.
* <p>
* <strong>Throttling update requests</strong>
* <p>
* To control the rate at which update by query issues batches of update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public class FlushStats implements JsonpSerializable {

private final long totalTimeInMillis;

@Nullable
private final Time totalTimeExcludingWaiting;

private final long totalTimeExcludingWaitingOnLockInMillis;

// ---------------------------------------------------------------------------------------------

private FlushStats(Builder builder) {
Expand All @@ -76,6 +81,9 @@ private FlushStats(Builder builder) {
this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0);
this.totalTime = builder.totalTime;
this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis", 0);
this.totalTimeExcludingWaiting = builder.totalTimeExcludingWaiting;
this.totalTimeExcludingWaitingOnLockInMillis = ApiTypeHelper.requireNonNull(
builder.totalTimeExcludingWaitingOnLockInMillis, this, "totalTimeExcludingWaitingOnLockInMillis", 0);

}

Expand Down Expand Up @@ -112,6 +120,21 @@ public final long totalTimeInMillis() {
return this.totalTimeInMillis;
}

/**
* API name: {@code total_time_excluding_waiting}
*/
@Nullable
public final Time totalTimeExcludingWaiting() {
return this.totalTimeExcludingWaiting;
}

/**
* Required - API name: {@code total_time_excluding_waiting_on_lock_in_millis}
*/
public final long totalTimeExcludingWaitingOnLockInMillis() {
return this.totalTimeExcludingWaitingOnLockInMillis;
}

/**
* Serialize this object to JSON.
*/
Expand All @@ -137,6 +160,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("total_time_in_millis");
generator.write(this.totalTimeInMillis);

if (this.totalTimeExcludingWaiting != null) {
generator.writeKey("total_time_excluding_waiting");
this.totalTimeExcludingWaiting.serialize(generator, mapper);

}
generator.writeKey("total_time_excluding_waiting_on_lock_in_millis");
generator.write(this.totalTimeExcludingWaitingOnLockInMillis);

}

@Override
Expand All @@ -160,13 +191,20 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement

private Long totalTimeInMillis;

@Nullable
private Time totalTimeExcludingWaiting;

private Long totalTimeExcludingWaitingOnLockInMillis;

public Builder() {
}
private Builder(FlushStats instance) {
this.periodic = instance.periodic;
this.total = instance.total;
this.totalTime = instance.totalTime;
this.totalTimeInMillis = instance.totalTimeInMillis;
this.totalTimeExcludingWaiting = instance.totalTimeExcludingWaiting;
this.totalTimeExcludingWaitingOnLockInMillis = instance.totalTimeExcludingWaitingOnLockInMillis;

}
/**
Expand Down Expand Up @@ -208,6 +246,29 @@ public final Builder totalTimeInMillis(long value) {
return this;
}

/**
* API name: {@code total_time_excluding_waiting}
*/
public final Builder totalTimeExcludingWaiting(@Nullable Time value) {
this.totalTimeExcludingWaiting = value;
return this;
}

/**
* API name: {@code total_time_excluding_waiting}
*/
public final Builder totalTimeExcludingWaiting(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return this.totalTimeExcludingWaiting(fn.apply(new Time.Builder()).build());
}

/**
* Required - API name: {@code total_time_excluding_waiting_on_lock_in_millis}
*/
public final Builder totalTimeExcludingWaitingOnLockInMillis(long value) {
this.totalTimeExcludingWaitingOnLockInMillis = value;
return this;
}

@Override
protected Builder self() {
return this;
Expand Down Expand Up @@ -246,6 +307,9 @@ protected static void setupFlushStatsDeserializer(ObjectDeserializer<FlushStats.
op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total");
op.add(Builder::totalTime, Time._DESERIALIZER, "total_time");
op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis");
op.add(Builder::totalTimeExcludingWaiting, Time._DESERIALIZER, "total_time_excluding_waiting");
op.add(Builder::totalTimeExcludingWaitingOnLockInMillis, JsonpDeserializer.longDeserializer(),
"total_time_excluding_waiting_on_lock_in_millis");

}

Expand Down
Loading
Loading