forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added transport action for bulk async shard fetch for primary shards
Signed-off-by: sudarshan baliga <[email protected]>
- Loading branch information
1 parent
63dc6aa
commit 1dd4866
Showing
5 changed files
with
687 additions
and
72 deletions.
There are no files selected for viewing
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
32 changes: 32 additions & 0 deletions
32
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,32 @@ | ||
/* | ||
* 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 since it fetches | ||
* the data in asynchronous manner too. | ||
* @param <T> | ||
*/ | ||
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> shardsIdMap, ActionListener<NodesResponse> listener); | ||
} | ||
} |
Oops, something went wrong.