Skip to content

Commit

Permalink
Binding of Trasnport Classes to Injector
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav614 committed Jul 18, 2023
1 parent ddc353d commit fb3e757
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ public abstract AllocateUnassignedDecision makeAllocationDecision(
Logger logger
);

/**
* Returns a list of {@link NodeAllocationResult}
/**
* Builds decisions for all nodes in the cluster, so that the explain API can provide information on
* allocation decisions for each node, while still waiting to allocate the shard (e.g. due to fetching shard data).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public class GatewayAllocator implements ExistingShardsAllocator {
private final TransportNodesListGatewayStartedShardsBatch batchStartedAction;
private final TransportNodesListShardStoreMetadataBatch batchStoreAction;


private final ConcurrentMap<
ShardId,
AsyncShardFetch<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards>> asyncFetchStarted = ConcurrentCollections
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
package org.opensearch.gateway;

import org.opensearch.common.inject.AbstractModule;
import org.opensearch.indices.store.TransportNodesListShardStoreMetadataBatch;

/**
* Binds the gateway module
Expand All @@ -47,6 +48,7 @@ protected void configure() {
bind(GatewayService.class).asEagerSingleton();
bind(TransportNodesListGatewayMetaState.class).asEagerSingleton();
bind(TransportNodesListGatewayStartedShards.class).asEagerSingleton();
bind(TransportNodesListGatewayStartedShardsBatch.class).asEagerSingleton();
bind(LocalAllocateDangledIndices.class).asEagerSingleton();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ public AllocateUnassignedDecision makeAllocationDecision(
}

final FetchResult<NodeGatewayStartedShards> shardState = fetchData(unassignedShard, allocation);
// final FetchResult<TransportNodesBatchListGatewayStartedShards.NodeGatewayStartedShardsBatch> batchFetchResult = fetchBatchData(allocation);

if (shardState.hasData() == false) {
allocation.setHasPendingAsyncFetch();
List<NodeAllocationResult> nodeDecisions = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
import org.opensearch.indices.replication.checkpoint.SegmentReplicationCheckpointPublisher;
import org.opensearch.indices.store.IndicesStore;
import org.opensearch.indices.store.TransportNodesListShardStoreMetadata;
import org.opensearch.indices.store.TransportNodesListShardStoreMetadataBatch;
import org.opensearch.plugins.MapperPlugin;

import java.util.ArrayList;
Expand Down Expand Up @@ -277,6 +278,7 @@ protected void configure() {
bind(IndicesStore.class).asEagerSingleton();
bind(IndicesClusterStateService.class).asEagerSingleton();
bind(TransportNodesListShardStoreMetadata.class).asEagerSingleton();
bind(TransportNodesListShardStoreMetadataBatch.class).asEagerSingleton();
bind(GlobalCheckpointSyncAction.class).asEagerSingleton();
bind(TransportResyncReplicationAction.class).asEagerSingleton();
bind(PrimaryReplicaSyncer.class).asEagerSingleton();
Expand Down

0 comments on commit fb3e757

Please sign in to comment.