Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <[email protected]>
  • Loading branch information
bharath-techie committed Jul 21, 2022
1 parent 25bb645 commit 717cd66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ public void deletePitContexts(
.filter(ctx -> Strings.isEmpty(ctx.getSearchContextIdForNode().getClusterAlias()) == false)
.map(c -> c.getSearchContextIdForNode().getClusterAlias())
.collect(Collectors.toSet());
StepListener<BiFunction<String, String, DiscoveryNode>> lookupListener = SearchUtils.getConnectionLookupListener(
searchTransportService.getRemoteClusterService(),
clusterService.state(),
clusters
);
StepListener<BiFunction<String, String, DiscoveryNode>> lookupListener = (StepListener<
BiFunction<String, String, DiscoveryNode>>) SearchUtils.getConnectionLookupListener(
searchTransportService.getRemoteClusterService(),
clusterService.state(),
clusters
);
lookupListener.whenComplete(nodeLookup -> {
final GroupedActionListener<DeletePitResponse> groupedListener = getDeletePitGroupedListener(
listener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package org.opensearch.action.search;

import org.opensearch.action.ActionListener;
import org.opensearch.action.StepListener;
import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.node.DiscoveryNode;
Expand All @@ -26,7 +27,7 @@ public SearchUtils() {}
/**
* Get connection lookup listener for list of clusters passed
*/
public static StepListener<BiFunction<String, String, DiscoveryNode>> getConnectionLookupListener(
public static ActionListener<BiFunction<String, String, DiscoveryNode>> getConnectionLookupListener(
RemoteClusterService remoteClusterService,
ClusterState state,
Set<String> clusters
Expand Down

0 comments on commit 717cd66

Please sign in to comment.