-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add batch async shard fetch transport action for replica #8218
Modify async replica shard fetch to use helper functions Signed-off-by: sudarshan baliga <[email protected]>
- Loading branch information
1 parent
73b7a85
commit fb5a983
Showing
7 changed files
with
627 additions
and
201 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
server/src/main/java/org/opensearch/gateway/AsyncShardsFetchPerNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.gateway; | ||
|
||
import org.opensearch.action.ActionListener; | ||
import org.opensearch.action.support.nodes.BaseNodeResponse; | ||
import org.opensearch.action.support.nodes.BaseNodesResponse; | ||
import org.opensearch.cluster.node.DiscoveryNode; | ||
import org.opensearch.common.lease.Releasable; | ||
import org.opensearch.index.shard.ShardId; | ||
|
||
import java.util.Map; | ||
|
||
|
||
/** | ||
* This class is responsible for fetching shard data from nodes. It is analogous to AsyncShardFetch class except | ||
* that we fetch batch of shards in this class from single transport request to a node. | ||
* @param <T> | ||
* | ||
* @opensearch.internal | ||
*/ | ||
public abstract class AsyncShardsFetchPerNode<T extends BaseNodeResponse> implements Releasable { | ||
|
||
/** | ||
* An action that lists the relevant shard data that needs to be fetched. | ||
*/ | ||
public interface Lister<NodesResponse extends BaseNodesResponse<NodeResponse>, NodeResponse extends BaseNodeResponse> { | ||
void list(DiscoveryNode[] nodes, Map<ShardId, String> shardIdsWithCustomDataPath, ActionListener<NodesResponse> listener); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.