Search in sources :

Example 1 with ActionListenerResponseHandler

use of org.opensearch.action.ActionListenerResponseHandler in project OpenSearch by opensearch-project.

the class TransportGetTaskAction method runOnNodeWithTaskIfPossible.

/**
 * Executed on the coordinating node to forward execution of the remaining work to the node that matches that requested
 * {@link TaskId#getNodeId()}. If the node isn't in the cluster then this will just proceed to
 * {@link #getFinishedTaskFromIndex(Task, GetTaskRequest, ActionListener)} on this node.
 */
private void runOnNodeWithTaskIfPossible(Task thisTask, GetTaskRequest request, ActionListener<GetTaskResponse> listener) {
    TransportRequestOptions.Builder builder = TransportRequestOptions.builder();
    if (request.getTimeout() != null) {
        builder.withTimeout(request.getTimeout());
    }
    DiscoveryNode node = clusterService.state().nodes().get(request.getTaskId().getNodeId());
    if (node == null) {
        // Node is no longer part of the cluster! Try and look the task up from the results index.
        getFinishedTaskFromIndex(thisTask, request, ActionListener.wrap(listener::onResponse, e -> {
            if (e instanceof ResourceNotFoundException) {
                e = new ResourceNotFoundException("task [" + request.getTaskId() + "] belongs to the node [" + request.getTaskId().getNodeId() + "] which isn't part of the cluster and there is no record of the task", e);
            }
            listener.onFailure(e);
        }));
        return;
    }
    GetTaskRequest nodeRequest = request.nodeRequest(clusterService.localNode().getId(), thisTask.getId());
    transportService.sendRequest(node, GetTaskAction.NAME, nodeRequest, builder.build(), new ActionListenerResponseHandler<>(listener, GetTaskResponse::new, ThreadPool.Names.SAME));
}
Also used : HandledTransportAction(org.opensearch.action.support.HandledTransportAction) AbstractRunnable(org.opensearch.common.util.concurrent.AbstractRunnable) ThreadPool(org.opensearch.threadpool.ThreadPool) OpenSearchException(org.opensearch.OpenSearchException) ResourceNotFoundException(org.opensearch.ResourceNotFoundException) XContentParser(org.opensearch.common.xcontent.XContentParser) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) Inject(org.opensearch.common.inject.Inject) ActionListener(org.opensearch.action.ActionListener) GetResponse(org.opensearch.action.get.GetResponse) TaskResultsService(org.opensearch.tasks.TaskResultsService) Client(org.opensearch.client.Client) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) GetRequest(org.opensearch.action.get.GetRequest) LoggingDeprecationHandler(org.opensearch.common.xcontent.LoggingDeprecationHandler) TaskResult(org.opensearch.tasks.TaskResult) TransportRequestOptions(org.opensearch.transport.TransportRequestOptions) ExceptionsHelper(org.opensearch.ExceptionsHelper) TaskId(org.opensearch.tasks.TaskId) IOException(java.io.IOException) Task(org.opensearch.tasks.Task) TransportService(org.opensearch.transport.TransportService) XContentHelper(org.opensearch.common.xcontent.XContentHelper) ActionFilters(org.opensearch.action.support.ActionFilters) TaskInfo(org.opensearch.tasks.TaskInfo) NamedXContentRegistry(org.opensearch.common.xcontent.NamedXContentRegistry) TransportListTasksAction.waitForCompletionTimeout(org.opensearch.action.admin.cluster.node.tasks.list.TransportListTasksAction.waitForCompletionTimeout) ActionListenerResponseHandler(org.opensearch.action.ActionListenerResponseHandler) ClusterService(org.opensearch.cluster.service.ClusterService) OriginSettingClient(org.opensearch.client.OriginSettingClient) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequestOptions(org.opensearch.transport.TransportRequestOptions) ResourceNotFoundException(org.opensearch.ResourceNotFoundException)

Example 2 with ActionListenerResponseHandler

use of org.opensearch.action.ActionListenerResponseHandler in project OpenSearch by opensearch-project.

the class TransportClusterRerouteAction method verifyThenSubmitUpdate.

private void verifyThenSubmitUpdate(ClusterRerouteRequest request, ActionListener<ClusterRerouteResponse> listener, Map<String, List<AbstractAllocateAllocationCommand>> stalePrimaryAllocations) {
    transportService.sendRequest(transportService.getLocalNode(), IndicesShardStoresAction.NAME, new IndicesShardStoresRequest().indices(stalePrimaryAllocations.keySet().toArray(Strings.EMPTY_ARRAY)), new ActionListenerResponseHandler<>(ActionListener.wrap(response -> {
        ImmutableOpenMap<String, ImmutableOpenIntMap<List<IndicesShardStoresResponse.StoreStatus>>> status = response.getStoreStatuses();
        Exception e = null;
        for (Map.Entry<String, List<AbstractAllocateAllocationCommand>> entry : stalePrimaryAllocations.entrySet()) {
            final String index = entry.getKey();
            final ImmutableOpenIntMap<List<IndicesShardStoresResponse.StoreStatus>> indexStatus = status.get(index);
            if (indexStatus == null) {
                // request. We ignore it here since the relevant exception will be thrown by the reroute action later on.
                continue;
            }
            for (AbstractAllocateAllocationCommand command : entry.getValue()) {
                final List<IndicesShardStoresResponse.StoreStatus> shardStatus = indexStatus.get(command.shardId());
                if (shardStatus == null || shardStatus.isEmpty()) {
                    e = ExceptionsHelper.useOrSuppress(e, new IllegalArgumentException("No data for shard [" + command.shardId() + "] of index [" + index + "] found on any node"));
                } else if (shardStatus.stream().noneMatch(storeStatus -> {
                    final DiscoveryNode node = storeStatus.getNode();
                    final String nodeInCommand = command.node();
                    return nodeInCommand.equals(node.getName()) || nodeInCommand.equals(node.getId());
                })) {
                    e = ExceptionsHelper.useOrSuppress(e, new IllegalArgumentException("No data for shard [" + command.shardId() + "] of index [" + index + "] found on node [" + command.node() + ']'));
                }
            }
        }
        if (e == null) {
            submitStateUpdate(request, listener);
        } else {
            listener.onFailure(e);
        }
    }, listener::onFailure), IndicesShardStoresResponse::new));
}
Also used : ImmutableOpenMap(org.opensearch.common.collect.ImmutableOpenMap) ThreadPool(org.opensearch.threadpool.ThreadPool) AllocationService(org.opensearch.cluster.routing.allocation.AllocationService) Priority(org.opensearch.common.Priority) HashMap(java.util.HashMap) TransportMasterNodeAction(org.opensearch.action.support.master.TransportMasterNodeAction) AllocationCommand(org.opensearch.cluster.routing.allocation.command.AllocationCommand) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) IndicesShardStoresAction(org.opensearch.action.admin.indices.shards.IndicesShardStoresAction) AllocateStalePrimaryAllocationCommand(org.opensearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand) Strings(org.opensearch.common.Strings) ArrayList(java.util.ArrayList) ClusterState(org.opensearch.cluster.ClusterState) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) Map(java.util.Map) AckedClusterStateUpdateTask(org.opensearch.cluster.AckedClusterStateUpdateTask) Inject(org.opensearch.common.inject.Inject) ActionListener(org.opensearch.action.ActionListener) StreamInput(org.opensearch.common.io.stream.StreamInput) IndicesShardStoresResponse(org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse) RoutingExplanations(org.opensearch.cluster.routing.allocation.RoutingExplanations) ImmutableOpenIntMap(org.opensearch.common.collect.ImmutableOpenIntMap) ClusterBlockLevel(org.opensearch.cluster.block.ClusterBlockLevel) ExceptionsHelper(org.opensearch.ExceptionsHelper) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) IOException(java.io.IOException) AbstractAllocateAllocationCommand(org.opensearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand) TransportService(org.opensearch.transport.TransportService) IndicesShardStoresRequest(org.opensearch.action.admin.indices.shards.IndicesShardStoresRequest) ActionFilters(org.opensearch.action.support.ActionFilters) List(java.util.List) Logger(org.apache.logging.log4j.Logger) ActionListenerResponseHandler(org.opensearch.action.ActionListenerResponseHandler) ClusterService(org.opensearch.cluster.service.ClusterService) LogManager(org.apache.logging.log4j.LogManager) IndexNameExpressionResolver(org.opensearch.cluster.metadata.IndexNameExpressionResolver) IndicesShardStoresRequest(org.opensearch.action.admin.indices.shards.IndicesShardStoresRequest) IndicesShardStoresResponse(org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) AbstractAllocateAllocationCommand(org.opensearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) IOException(java.io.IOException) ImmutableOpenIntMap(org.opensearch.common.collect.ImmutableOpenIntMap) ArrayList(java.util.ArrayList) List(java.util.List) ImmutableOpenMap(org.opensearch.common.collect.ImmutableOpenMap) HashMap(java.util.HashMap) Map(java.util.Map) ImmutableOpenIntMap(org.opensearch.common.collect.ImmutableOpenIntMap)

Example 3 with ActionListenerResponseHandler

use of org.opensearch.action.ActionListenerResponseHandler in project OpenSearch by opensearch-project.

the class JoinHelperTests method assertJoinValidationRejectsMismatchedClusterUUID.

private void assertJoinValidationRejectsMismatchedClusterUUID(String actionName, String expectedMessage) {
    DeterministicTaskQueue deterministicTaskQueue = new DeterministicTaskQueue(Settings.builder().put(NODE_NAME_SETTING.getKey(), "node0").build(), random());
    MockTransport mockTransport = new MockTransport();
    DiscoveryNode localNode = new DiscoveryNode("node0", buildNewFakeTransportAddress(), Version.CURRENT);
    final ClusterState localClusterState = ClusterState.builder(ClusterName.DEFAULT).metadata(Metadata.builder().generateClusterUuidIfNeeded().clusterUUIDCommitted(true)).build();
    TransportService transportService = mockTransport.createTransportService(Settings.EMPTY, deterministicTaskQueue.getThreadPool(), TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> localNode, null, Collections.emptySet());
    new JoinHelper(Settings.EMPTY, null, null, transportService, () -> 0L, () -> localClusterState, (joinRequest, joinCallback) -> {
        throw new AssertionError();
    }, startJoinRequest -> {
        throw new AssertionError();
    }, Collections.emptyList(), (s, p, r) -> {
    }, null);
    // registers request handler
    transportService.start();
    transportService.acceptIncomingRequests();
    final ClusterState otherClusterState = ClusterState.builder(ClusterName.DEFAULT).metadata(Metadata.builder().generateClusterUuidIfNeeded()).build();
    final PlainActionFuture<TransportResponse.Empty> future = new PlainActionFuture<>();
    transportService.sendRequest(localNode, actionName, new ValidateJoinRequest(otherClusterState), new ActionListenerResponseHandler<>(future, in -> TransportResponse.Empty.INSTANCE));
    deterministicTaskQueue.runAllTasks();
    final CoordinationStateRejectedException coordinationStateRejectedException = expectThrows(CoordinationStateRejectedException.class, future::actionGet);
    assertThat(coordinationStateRejectedException.getMessage(), containsString(expectedMessage));
    assertThat(coordinationStateRejectedException.getMessage(), containsString(localClusterState.metadata().clusterUUID()));
    assertThat(coordinationStateRejectedException.getMessage(), containsString(otherClusterState.metadata().clusterUUID()));
}
Also used : Metadata(org.opensearch.cluster.metadata.Metadata) Level(org.apache.logging.log4j.Level) Version(org.opensearch.Version) AtomicReference(java.util.concurrent.atomic.AtomicReference) ClusterState(org.opensearch.cluster.ClusterState) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) MockTransport(org.opensearch.test.transport.MockTransport) NotMasterException(org.opensearch.cluster.NotMasterException) Is.is(org.hamcrest.core.Is.is) UNHEALTHY(org.opensearch.monitor.StatusInfo.Status.UNHEALTHY) OpenSearchTestCase(org.opensearch.test.OpenSearchTestCase) RemoteTransportException(org.opensearch.transport.RemoteTransportException) HEALTHY(org.opensearch.monitor.StatusInfo.Status.HEALTHY) Settings(org.opensearch.common.settings.Settings) TransportResponse(org.opensearch.transport.TransportResponse) TransportService(org.opensearch.transport.TransportService) CapturedRequest(org.opensearch.test.transport.CapturingTransport.CapturedRequest) NODE_NAME_SETTING(org.opensearch.node.Node.NODE_NAME_SETTING) Matchers.equalTo(org.hamcrest.Matchers.equalTo) ActionListenerResponseHandler(org.opensearch.action.ActionListenerResponseHandler) ClusterName(org.opensearch.cluster.ClusterName) StatusInfo(org.opensearch.monitor.StatusInfo) Optional(java.util.Optional) CapturingTransport(org.opensearch.test.transport.CapturingTransport) Collections(java.util.Collections) Matchers.containsString(org.hamcrest.Matchers.containsString) TransportException(org.opensearch.transport.TransportException) ClusterState(org.opensearch.cluster.ClusterState) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportService(org.opensearch.transport.TransportService) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) MockTransport(org.opensearch.test.transport.MockTransport)

Example 4 with ActionListenerResponseHandler

use of org.opensearch.action.ActionListenerResponseHandler in project OpenSearch by opensearch-project.

the class AbstractSimpleTransportTestCase method testConcurrentSendRespondAndDisconnect.

public void testConcurrentSendRespondAndDisconnect() throws BrokenBarrierException, InterruptedException {
    Set<Exception> sendingErrors = ConcurrentCollections.newConcurrentSet();
    Set<Exception> responseErrors = ConcurrentCollections.newConcurrentSet();
    serviceA.registerRequestHandler("internal:test", randomBoolean() ? ThreadPool.Names.SAME : ThreadPool.Names.GENERIC, TestRequest::new, (request, channel, task) -> {
        try {
            channel.sendResponse(new TestResponse((String) null));
        } catch (Exception e) {
            logger.info("caught exception while responding", e);
            responseErrors.add(e);
        }
    });
    final TransportRequestHandler<TestRequest> ignoringRequestHandler = (request, channel, task) -> {
        try {
            channel.sendResponse(new TestResponse((String) null));
        } catch (Exception e) {
            // we don't really care what's going on B, we're testing through A
            logger.trace("caught exception while responding from node B", e);
        }
    };
    serviceB.registerRequestHandler("internal:test", ThreadPool.Names.SAME, TestRequest::new, ignoringRequestHandler);
    int halfSenders = scaledRandomIntBetween(3, 10);
    final CyclicBarrier go = new CyclicBarrier(halfSenders * 2 + 1);
    final CountDownLatch done = new CountDownLatch(halfSenders * 2);
    for (int i = 0; i < halfSenders; i++) {
        // B senders just generated activity so serciveA can respond, we don't test what's going on there
        final int sender = i;
        threadPool.executor(ThreadPool.Names.GENERIC).execute(new AbstractRunnable() {

            @Override
            public void onFailure(Exception e) {
                logger.trace("caught exception while sending from B", e);
            }

            @Override
            protected void doRun() throws Exception {
                go.await();
                for (int iter = 0; iter < 10; iter++) {
                    PlainActionFuture<TestResponse> listener = new PlainActionFuture<>();
                    final String info = sender + "_B_" + iter;
                    serviceB.sendRequest(nodeA, "test", new TestRequest(info), new ActionListenerResponseHandler<>(listener, TestResponse::new));
                    try {
                        listener.actionGet();
                    } catch (Exception e) {
                        logger.trace((Supplier<?>) () -> new ParameterizedMessage("caught exception while sending to node {}", nodeA), e);
                    }
                }
            }

            @Override
            public void onAfter() {
                done.countDown();
            }
        });
    }
    for (int i = 0; i < halfSenders; i++) {
        final int sender = i;
        threadPool.executor(ThreadPool.Names.GENERIC).execute(new AbstractRunnable() {

            @Override
            public void onFailure(Exception e) {
                logger.error("unexpected error", e);
                sendingErrors.add(e);
            }

            @Override
            protected void doRun() throws Exception {
                go.await();
                for (int iter = 0; iter < 10; iter++) {
                    PlainActionFuture<TestResponse> listener = new PlainActionFuture<>();
                    final String info = sender + "_" + iter;
                    // capture now
                    final DiscoveryNode node = nodeB;
                    try {
                        serviceA.sendRequest(node, "internal:test", new TestRequest(info), new ActionListenerResponseHandler<>(listener, TestResponse::new));
                        try {
                            listener.actionGet();
                        } catch (ConnectTransportException e) {
                        // ok!
                        } catch (Exception e) {
                            logger.error((Supplier<?>) () -> new ParameterizedMessage("caught exception while sending to node {}", node), e);
                            sendingErrors.add(e);
                        }
                    } catch (NodeNotConnectedException ex) {
                    // ok
                    }
                }
            }

            @Override
            public void onAfter() {
                done.countDown();
            }
        });
    }
    go.await();
    for (int i = 0; i <= 10; i++) {
        if (i % 3 == 0) {
            // simulate restart of nodeB
            serviceB.close();
            MockTransportService newService = buildService("TS_B_" + i, version1, Settings.EMPTY);
            newService.registerRequestHandler("internal:test", ThreadPool.Names.SAME, TestRequest::new, ignoringRequestHandler);
            serviceB = newService;
            nodeB = newService.getLocalDiscoNode();
            serviceB.connectToNode(nodeA);
            serviceA.connectToNode(nodeB);
        } else if (serviceA.nodeConnected(nodeB)) {
            serviceA.disconnectFromNode(nodeB);
        } else {
            serviceA.connectToNode(nodeB);
        }
    }
    done.await();
    assertThat("found non connection errors while sending", sendingErrors, empty());
    assertThat("found non connection errors while responding", responseErrors, empty());
}
Also used : Matchers.hasToString(org.hamcrest.Matchers.hasToString) Arrays(java.util.Arrays) AbstractRunnable(org.opensearch.common.util.concurrent.AbstractRunnable) StubbableTransport(org.opensearch.test.transport.StubbableTransport) TestThreadPool(org.opensearch.threadpool.TestThreadPool) Matchers.not(org.hamcrest.Matchers.not) Level(org.apache.logging.log4j.Level) Version(org.opensearch.Version) BoundTransportAddress(org.opensearch.common.transport.BoundTransportAddress) OpenSearchException(org.opensearch.OpenSearchException) ConcurrentCollections(org.opensearch.common.util.concurrent.ConcurrentCollections) InetAddress(java.net.InetAddress) ServerSocket(java.net.ServerSocket) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) V_3_0_0(org.opensearch.transport.TransportHandshaker.V_3_0_0) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) After(org.junit.After) Map(java.util.Map) Matchers.nullValue(org.hamcrest.Matchers.nullValue) ActionListener(org.opensearch.action.ActionListener) SuppressForbidden(org.opensearch.common.SuppressForbidden) CyclicBarrier(java.util.concurrent.CyclicBarrier) TimeValue(org.opensearch.common.unit.TimeValue) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) OpenSearchTestCase(org.opensearch.test.OpenSearchTestCase) ExceptionsHelper(org.opensearch.ExceptionsHelper) Set(java.util.Set) Settings(org.opensearch.common.settings.Settings) Task(org.opensearch.tasks.Task) InetSocketAddress(java.net.InetSocketAddress) Collectors(java.util.stream.Collectors) Nullable(org.opensearch.common.Nullable) Matchers.startsWith(org.hamcrest.Matchers.startsWith) TransportAddress(org.opensearch.common.transport.TransportAddress) UncheckedIOException(java.io.UncheckedIOException) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) CloseableChannel(org.opensearch.common.network.CloseableChannel) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Supplier(org.apache.logging.log4j.util.Supplier) Matchers.equalTo(org.hamcrest.Matchers.equalTo) ActionListenerResponseHandler(org.opensearch.action.ActionListenerResponseHandler) Matchers.containsString(org.hamcrest.Matchers.containsString) NOOP_TRANSPORT_INTERCEPTOR(org.opensearch.transport.TransportService.NOOP_TRANSPORT_INTERCEPTOR) MockLogAppender(org.opensearch.test.MockLogAppender) Socket(java.net.Socket) ThreadPool(org.opensearch.threadpool.ThreadPool) NetworkUtils(org.opensearch.common.network.NetworkUtils) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) StreamOutput(org.opensearch.common.io.stream.StreamOutput) HashMap(java.util.HashMap) Node(org.opensearch.node.Node) MockTransportService(org.opensearch.test.transport.MockTransportService) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) AtomicReference(java.util.concurrent.atomic.AtomicReference) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) LegacyESVersion(org.opensearch.LegacyESVersion) VersionUtils(org.opensearch.test.VersionUtils) ClusterSettings(org.opensearch.common.settings.ClusterSettings) Before(org.junit.Before) StreamInput(org.opensearch.common.io.stream.StreamInput) NetworkAddress(org.opensearch.common.network.NetworkAddress) Collections.emptyMap(java.util.Collections.emptyMap) Matchers.empty(org.hamcrest.Matchers.empty) Setting(org.opensearch.common.settings.Setting) Collections.emptySet(java.util.Collections.emptySet) Semaphore(java.util.concurrent.Semaphore) IOException(java.io.IOException) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) BytesStreamOutput(org.opensearch.common.io.stream.BytesStreamOutput) Inet4Address(java.net.Inet4Address) UnknownHostException(java.net.UnknownHostException) CollectionUtil(org.apache.lucene.util.CollectionUtil) IOUtils(org.opensearch.core.internal.io.IOUtils) TestLogging(org.opensearch.test.junit.annotations.TestLogging) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Inet6Address(java.net.Inet6Address) Constants(org.apache.lucene.util.Constants) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) AbstractRunnable(org.opensearch.common.util.concurrent.AbstractRunnable) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) MockTransportService(org.opensearch.test.transport.MockTransportService) Matchers.hasToString(org.hamcrest.Matchers.hasToString) Matchers.containsString(org.hamcrest.Matchers.containsString) CountDownLatch(java.util.concurrent.CountDownLatch) OpenSearchException(org.opensearch.OpenSearchException) UncheckedIOException(java.io.UncheckedIOException) IOException(java.io.IOException) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException) CyclicBarrier(java.util.concurrent.CyclicBarrier) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) ActionListenerResponseHandler(org.opensearch.action.ActionListenerResponseHandler) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage)

Aggregations

ActionListenerResponseHandler (org.opensearch.action.ActionListenerResponseHandler)4 DiscoveryNode (org.opensearch.cluster.node.DiscoveryNode)4 IOException (java.io.IOException)3 ExceptionsHelper (org.opensearch.ExceptionsHelper)3 ActionListener (org.opensearch.action.ActionListener)3 ThreadPool (org.opensearch.threadpool.ThreadPool)3 TransportService (org.opensearch.transport.TransportService)3 ArrayList (java.util.ArrayList)2 Collections (java.util.Collections)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 Level (org.apache.logging.log4j.Level)2 LogManager (org.apache.logging.log4j.LogManager)2 Logger (org.apache.logging.log4j.Logger)2 ParameterizedMessage (org.apache.logging.log4j.message.ParameterizedMessage)2 Matchers.containsString (org.hamcrest.Matchers.containsString)2 Matchers.equalTo (org.hamcrest.Matchers.equalTo)2 OpenSearchException (org.opensearch.OpenSearchException)2