Skip to content

Commit

Permalink
Fixing build and addressing comment
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <[email protected]>
  • Loading branch information
bharath-techie committed Sep 2, 2022
1 parent 5167a2c commit 13b5f4c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1377,11 +1377,11 @@ public final Cancellable deleteAllPitsAsync(RequestOptions options, ActionListen
*/
public final GetAllPitNodesResponse getAllPits(RequestOptions options) throws IOException {
return performRequestAndParseEntity(
new MainRequest(),
(request) -> RequestConverters.getAllPits(),
options,
GetAllPitNodesResponse::fromXContent,
emptySet()
new MainRequest(),
(request) -> RequestConverters.getAllPits(),
options,
GetAllPitNodesResponse::fromXContent,
emptySet()
);
}

Expand All @@ -1394,12 +1394,12 @@ public final GetAllPitNodesResponse getAllPits(RequestOptions options) throws IO
*/
public final Cancellable getAllPitsAsync(RequestOptions options, ActionListener<GetAllPitNodesResponse> listener) {
return performRequestAsyncAndParseEntity(
new MainRequest(),
(request) -> RequestConverters.getAllPits(),
options,
GetAllPitNodesResponse::fromXContent,
listener,
emptySet()
new MainRequest(),
(request) -> RequestConverters.getAllPits(),
options,
GetAllPitNodesResponse::fromXContent,
listener,
emptySet()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public class RestHighLevelClientTests extends OpenSearchTestCase {
"ping",
"info",
"delete_all_pits",
"get_all_pits",
// security
"security.get_ssl_certificates",
"security.authenticate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public GetAllPitNodesResponse(StreamInput in) throws IOException {

public GetAllPitNodesResponse(
ClusterName clusterName,
List<GetAllPitNodeResponse> getAllPitNodeResponse,
List<GetAllPitNodeResponse> getAllPitNodeResponseList,
List<FailedNodeException> failures
) {
super(clusterName, getAllPitNodeResponse, failures);
super(clusterName, getAllPitNodeResponseList, failures);
Set<String> uniquePitIds = new HashSet<>();
pitInfos.addAll(
getAllPitNodeResponse.stream()
getAllPitNodeResponseList.stream()
.flatMap(p -> p.getPitInfos().stream().filter(t -> uniquePitIds.add(t.getPitId())))
.collect(Collectors.toList())
);
Expand Down

0 comments on commit 13b5f4c

Please sign in to comment.