Skip to content

Commit

Permalink
Generate cat.segment_replication
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
  • Loading branch information
Xtansia committed Jan 7, 2025
1 parent 6253f21 commit 36796e8
Show file tree
Hide file tree
Showing 11 changed files with 1,998 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,37 @@ public final CompletableFuture<RepositoriesResponse> repositories() throws IOExc
return repositories(new RepositoriesRequest.Builder().build());
}

// ----- Endpoint: cat.segment_replication

/**
* Returns information about active and last-completed segment replication events on each replica shard, including related shard-level
* metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
*/
public CompletableFuture<SegmentReplicationResponse> segmentReplication(SegmentReplicationRequest request) throws IOException,
OpenSearchException {
return this.transport.performRequestAsync(request, SegmentReplicationRequest._ENDPOINT, this.transportOptions);
}

/**
* Returns information about active and last-completed segment replication events on each replica shard, including related shard-level
* metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
*
* @param fn a function that initializes a builder to create the {@link SegmentReplicationRequest}
*/
public final CompletableFuture<SegmentReplicationResponse> segmentReplication(
Function<SegmentReplicationRequest.Builder, ObjectBuilder<SegmentReplicationRequest>> fn
) throws IOException, OpenSearchException {
return segmentReplication(fn.apply(new SegmentReplicationRequest.Builder()).build());
}

/**
* Returns information about active and last-completed segment replication events on each replica shard, including related shard-level
* metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
*/
public final CompletableFuture<SegmentReplicationResponse> segmentReplication() throws IOException, OpenSearchException {
return segmentReplication(new SegmentReplicationRequest.Builder().build());
}

// ----- Endpoint: cat.segments

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,36 @@ public final RepositoriesResponse repositories() throws IOException, OpenSearchE
return repositories(new RepositoriesRequest.Builder().build());
}

// ----- Endpoint: cat.segment_replication

/**
* Returns information about active and last-completed segment replication events on each replica shard, including related shard-level
* metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
*/
public SegmentReplicationResponse segmentReplication(SegmentReplicationRequest request) throws IOException, OpenSearchException {
return this.transport.performRequest(request, SegmentReplicationRequest._ENDPOINT, this.transportOptions);
}

/**
* Returns information about active and last-completed segment replication events on each replica shard, including related shard-level
* metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
*
* @param fn a function that initializes a builder to create the {@link SegmentReplicationRequest}
*/
public final SegmentReplicationResponse segmentReplication(
Function<SegmentReplicationRequest.Builder, ObjectBuilder<SegmentReplicationRequest>> fn
) throws IOException, OpenSearchException {
return segmentReplication(fn.apply(new SegmentReplicationRequest.Builder()).build());
}

/**
* Returns information about active and last-completed segment replication events on each replica shard, including related shard-level
* metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
*/
public final SegmentReplicationResponse segmentReplication() throws IOException, OpenSearchException {
return segmentReplication(new SegmentReplicationRequest.Builder().build());
}

// ----- Endpoint: cat.segments

/**
Expand Down
Loading

0 comments on commit 36796e8

Please sign in to comment.