Search in sources :

Example 1 with TransportRequest

use of org.opensearch.transport.TransportRequest in project OpenSearch by opensearch-project.

the class IndicesRequestIT method assertSameIndices.

private static void assertSameIndices(IndicesRequest originalRequest, boolean optional, String... actions) {
    for (String action : actions) {
        List<TransportRequest> requests = consumeTransportRequests(action);
        if (!optional) {
            assertThat("no internal requests intercepted for action [" + action + "]", requests.size(), greaterThan(0));
        }
        for (TransportRequest internalRequest : requests) {
            IndicesRequest indicesRequest = convertRequest(internalRequest);
            assertThat(internalRequest.getClass().getName(), indicesRequest.indices(), equalTo(originalRequest.indices()));
            assertThat(indicesRequest.indicesOptions(), equalTo(originalRequest.indicesOptions()));
        }
    }
}
Also used : TransportRequest(org.opensearch.transport.TransportRequest)

Example 2 with TransportRequest

use of org.opensearch.transport.TransportRequest in project OpenSearch by opensearch-project.

the class DedicatedClusterSnapshotRestoreIT method testAbortWaitsOnDataNode.

public void testAbortWaitsOnDataNode() throws Exception {
    internalCluster().startMasterOnlyNode();
    final String dataNodeName = internalCluster().startDataOnlyNode();
    final String indexName = "test-index";
    createIndex(indexName);
    index(indexName, "_doc", "some_id", "foo", "bar");
    final String otherDataNode = internalCluster().startDataOnlyNode();
    final String repoName = "test-repo";
    createRepository(repoName, "mock");
    blockAllDataNodes(repoName);
    final String snapshotName = "test-snap";
    final ActionFuture<CreateSnapshotResponse> snapshotResponse = startFullSnapshot(repoName, snapshotName);
    waitForBlock(dataNodeName, repoName, TimeValue.timeValueSeconds(30L));
    final AtomicBoolean blocked = new AtomicBoolean(true);
    final TransportService transportService = internalCluster().getInstance(TransportService.class, otherDataNode);
    transportService.addMessageListener(new TransportMessageListener() {

        @Override
        public void onRequestSent(DiscoveryNode node, long requestId, String action, TransportRequest request, TransportRequestOptions finalOptions) {
            if (blocked.get() && action.equals(SnapshotsService.UPDATE_SNAPSHOT_STATUS_ACTION_NAME)) {
                throw new AssertionError("Node had no assigned shard snapshots so it shouldn't send out shard state updates");
            }
        }
    });
    logger.info("--> abort snapshot");
    final ActionFuture<AcknowledgedResponse> deleteResponse = startDeleteSnapshot(repoName, snapshotName);
    awaitClusterState(otherDataNode, state -> state.custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY).entries().stream().anyMatch(entry -> entry.state() == SnapshotsInProgress.State.ABORTED));
    assertFalse("delete should not be able to finish until data node is unblocked", deleteResponse.isDone());
    blocked.set(false);
    unblockAllDataNodes(repoName);
    assertAcked(deleteResponse.get());
    assertThat(snapshotResponse.get().getSnapshotInfo().state(), is(SnapshotState.FAILED));
}
Also used : RepositoryMissingException(org.opensearch.repositories.RepositoryMissingException) Arrays(java.util.Arrays) Metadata(org.opensearch.cluster.metadata.Metadata) CheckedFunction(org.opensearch.common.CheckedFunction) Matchers.not(org.hamcrest.Matchers.not) ClusterScope(org.opensearch.test.OpenSearchIntegTestCase.ClusterScope) Version(org.opensearch.Version) SnapshotsStatusResponse(org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse) Strings(org.opensearch.common.Strings) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) RecoveryState(org.opensearch.indices.recovery.RecoveryState) SnapshotStatus(org.opensearch.action.admin.cluster.snapshots.status.SnapshotStatus) Matchers.nullValue(org.hamcrest.Matchers.nullValue) Path(java.nio.file.Path) EnumSet(java.util.EnumSet) OpenSearchAssertions.assertRequestBuilderThrows(org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows) Client(org.opensearch.client.Client) TimeValue(org.opensearch.common.unit.TimeValue) NodeClient(org.opensearch.client.node.NodeClient) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) Matchers.allOf(org.hamcrest.Matchers.allOf) TransportRequestOptions(org.opensearch.transport.TransportRequestOptions) Settings(org.opensearch.common.settings.Settings) TestCustomMetadata(org.opensearch.test.TestCustomMetadata) Scope(org.opensearch.test.OpenSearchIntegTestCase.Scope) TransportService(org.opensearch.transport.TransportService) RetentionLeaseActions(org.opensearch.index.seqno.RetentionLeaseActions) UncheckedIOException(java.io.UncheckedIOException) FileVisitResult(java.nio.file.FileVisitResult) CountDownLatch(java.util.concurrent.CountDownLatch) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Matchers.is(org.hamcrest.Matchers.is) Matchers.containsString(org.hamcrest.Matchers.containsString) IndexNameExpressionResolver(org.opensearch.cluster.metadata.IndexNameExpressionResolver) Priority(org.opensearch.common.Priority) Node(org.opensearch.node.Node) ParseField(org.opensearch.common.ParseField) Writeable(org.opensearch.common.io.stream.Writeable) MockTransportService(org.opensearch.test.transport.MockTransportService) ArrayList(java.util.ArrayList) RestoreSnapshotResponse(org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse) ClusterState(org.opensearch.cluster.ClusterState) BusyMasterServiceDisruption(org.opensearch.test.disruption.BusyMasterServiceDisruption) Matchers.lessThan(org.hamcrest.Matchers.lessThan) Matchers.hasSize(org.hamcrest.Matchers.hasSize) AbstractRestChannel(org.opensearch.rest.AbstractRestChannel) Environment(org.opensearch.env.Environment) Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) Files(java.nio.file.Files) RETAIN_ALL(org.opensearch.index.seqno.RetentionLeaseActions.RETAIN_ALL) IOException(java.io.IOException) TransportMessageListener(org.opensearch.transport.TransportMessageListener) Plugin(org.opensearch.plugins.Plugin) NamedXContentRegistry(org.opensearch.common.xcontent.NamedXContentRegistry) RetentionLeases(org.opensearch.index.seqno.RetentionLeases) ClusterService(org.opensearch.cluster.service.ClusterService) ShardStats(org.opensearch.action.admin.indices.stats.ShardStats) IndexRequestBuilder(org.opensearch.action.index.IndexRequestBuilder) BlobStoreRepository(org.opensearch.repositories.blobstore.BlobStoreRepository) NodeRoles.nonMasterNode(org.opensearch.test.NodeRoles.nonMasterNode) ThreadContext(org.opensearch.common.util.concurrent.ThreadContext) XContentParser(org.opensearch.common.xcontent.XContentParser) FakeRestRequest(org.opensearch.test.rest.FakeRestRequest) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) Locale(java.util.Locale) SimpleFileVisitor(java.nio.file.SimpleFileVisitor) Collection(java.util.Collection) RestStatus(org.opensearch.rest.RestStatus) ServiceDisruptionScheme(org.opensearch.test.disruption.ServiceDisruptionScheme) MockRepository(org.opensearch.snapshots.mockstore.MockRepository) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) SnapshotStats(org.opensearch.action.admin.cluster.snapshots.status.SnapshotStats) RestGetRepositoriesAction(org.opensearch.rest.action.admin.cluster.RestGetRepositoriesAction) SnapshotsInProgress(org.opensearch.cluster.SnapshotsInProgress) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) InternalTestCluster(org.opensearch.test.InternalTestCluster) AtomicReference(java.util.concurrent.atomic.AtomicReference) NamedWriteableRegistry(org.opensearch.common.io.stream.NamedWriteableRegistry) PeerRecoveryTargetService(org.opensearch.indices.recovery.PeerRecoveryTargetService) StreamInput(org.opensearch.common.io.stream.StreamInput) SettingsFilter(org.opensearch.common.settings.SettingsFilter) OpenSearchAssertions.assertAcked(org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked) CreateSnapshotResponse(org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse) Setting(org.opensearch.common.settings.Setting) TransportRequest(org.opensearch.transport.TransportRequest) RestRequest(org.opensearch.rest.RestRequest) IntHashSet(com.carrotsearch.hppc.IntHashSet) IntSet(com.carrotsearch.hppc.IntSet) RestClusterStateAction(org.opensearch.rest.action.admin.cluster.RestClusterStateAction) BasicFileAttributes(java.nio.file.attribute.BasicFileAttributes) OpenSearchAssertions.assertFutureThrows(org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows) RestResponse(org.opensearch.rest.RestResponse) ActionFuture(org.opensearch.action.ActionFuture) ActiveShardCount(org.opensearch.action.support.ActiveShardCount) AcknowledgedResponse(org.opensearch.action.support.master.AcknowledgedResponse) ShardId(org.opensearch.index.shard.ShardId) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) Sets(org.opensearch.common.util.set.Sets) CreateSnapshotRequest(org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest) GetSnapshotsResponse(org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse) NamedDiff(org.opensearch.cluster.NamedDiff) Collections(java.util.Collections) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) AcknowledgedResponse(org.opensearch.action.support.master.AcknowledgedResponse) Matchers.containsString(org.hamcrest.Matchers.containsString) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) CreateSnapshotResponse(org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse) TransportService(org.opensearch.transport.TransportService) MockTransportService(org.opensearch.test.transport.MockTransportService) TransportRequestOptions(org.opensearch.transport.TransportRequestOptions) TransportMessageListener(org.opensearch.transport.TransportMessageListener)

Example 3 with TransportRequest

use of org.opensearch.transport.TransportRequest in project OpenSearch by opensearch-project.

the class PeerRecoveryTargetService method doRecovery.

private void doRecovery(final long recoveryId, final StartRecoveryRequest preExistingRequest) {
    final String actionName;
    final TransportRequest requestToSend;
    final StartRecoveryRequest startRequest;
    final RecoveryState.Timer timer;
    CancellableThreads cancellableThreads;
    try (RecoveryRef recoveryRef = onGoingRecoveries.getRecovery(recoveryId)) {
        if (recoveryRef == null) {
            logger.trace("not running recovery with id [{}] - can not find it (probably finished)", recoveryId);
            return;
        }
        final RecoveryTarget recoveryTarget = recoveryRef.target();
        timer = recoveryTarget.state().getTimer();
        cancellableThreads = recoveryTarget.cancellableThreads();
        if (preExistingRequest == null) {
            try {
                final IndexShard indexShard = recoveryTarget.indexShard();
                indexShard.preRecovery();
                assert recoveryTarget.sourceNode() != null : "can not do a recovery without a source node";
                logger.trace("{} preparing shard for peer recovery", recoveryTarget.shardId());
                indexShard.prepareForIndexRecovery();
                final long startingSeqNo = indexShard.recoverLocallyUpToGlobalCheckpoint();
                assert startingSeqNo == UNASSIGNED_SEQ_NO || recoveryTarget.state().getStage() == RecoveryState.Stage.TRANSLOG : "unexpected recovery stage [" + recoveryTarget.state().getStage() + "] starting seqno [ " + startingSeqNo + "]";
                startRequest = getStartRecoveryRequest(logger, clusterService.localNode(), recoveryTarget, startingSeqNo);
                requestToSend = startRequest;
                actionName = PeerRecoverySourceService.Actions.START_RECOVERY;
            } catch (final Exception e) {
                // this will be logged as warning later on...
                logger.trace("unexpected error while preparing shard for peer recovery, failing recovery", e);
                onGoingRecoveries.failRecovery(recoveryId, new RecoveryFailedException(recoveryTarget.state(), "failed to prepare shard for recovery", e), true);
                return;
            }
            logger.trace("{} starting recovery from {}", startRequest.shardId(), startRequest.sourceNode());
        } else {
            startRequest = preExistingRequest;
            requestToSend = new ReestablishRecoveryRequest(recoveryId, startRequest.shardId(), startRequest.targetAllocationId());
            actionName = PeerRecoverySourceService.Actions.REESTABLISH_RECOVERY;
            logger.trace("{} reestablishing recovery from {}", startRequest.shardId(), startRequest.sourceNode());
        }
    }
    RecoveryResponseHandler responseHandler = new RecoveryResponseHandler(startRequest, timer);
    try {
        cancellableThreads.executeIO(() -> transportService.sendRequest(startRequest.sourceNode(), actionName, requestToSend, responseHandler));
    } catch (CancellableThreads.ExecutionCancelledException e) {
        logger.trace("recovery cancelled", e);
    } catch (Exception e) {
        responseHandler.onException(e);
    }
}
Also used : CancellableThreads(org.opensearch.common.util.CancellableThreads) TransportRequest(org.opensearch.transport.TransportRequest) IndexShard(org.opensearch.index.shard.IndexShard) TranslogCorruptedException(org.opensearch.index.translog.TranslogCorruptedException) AlreadyClosedException(org.apache.lucene.store.AlreadyClosedException) RecoveryEngineException(org.opensearch.index.engine.RecoveryEngineException) OpenSearchException(org.opensearch.OpenSearchException) MapperException(org.opensearch.index.mapper.MapperException) OpenSearchTimeoutException(org.opensearch.OpenSearchTimeoutException) ConnectTransportException(org.opensearch.transport.ConnectTransportException) TransportException(org.opensearch.transport.TransportException) IllegalIndexShardStateException(org.opensearch.index.shard.IllegalIndexShardStateException) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) IOException(java.io.IOException) ShardNotFoundException(org.opensearch.index.shard.ShardNotFoundException) RecoveryRef(org.opensearch.indices.recovery.RecoveriesCollection.RecoveryRef)

Example 4 with TransportRequest

use of org.opensearch.transport.TransportRequest in project OpenSearch by opensearch-project.

the class ClusterBootstrapServiceTests method createServices.

@Before
public void createServices() {
    localNode = newDiscoveryNode("local");
    otherNode1 = newDiscoveryNode("other1");
    otherNode2 = newDiscoveryNode("other2");
    deterministicTaskQueue = new DeterministicTaskQueue(builder().put(NODE_NAME_SETTING.getKey(), "node").build(), random());
    final MockTransport transport = new MockTransport() {

        @Override
        protected void onSendRequest(long requestId, String action, TransportRequest request, DiscoveryNode node) {
            throw new AssertionError("unexpected " + action);
        }
    };
    transportService = transport.createTransportService(Settings.EMPTY, deterministicTaskQueue.getThreadPool(), TransportService.NOOP_TRANSPORT_INTERCEPTOR, boundTransportAddress -> localNode, null, emptySet());
}
Also used : NodeRoles.nonMasterNode(org.opensearch.test.NodeRoles.nonMasterNode) Matchers.not(org.hamcrest.Matchers.not) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Version(org.opensearch.Version) OpenSearchException(org.opensearch.OpenSearchException) AtomicReference(java.util.concurrent.atomic.AtomicReference) Supplier(java.util.function.Supplier) Collections.singletonList(java.util.Collections.singletonList) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) BOOTSTRAP_PLACEHOLDER_PREFIX(org.opensearch.cluster.coordination.ClusterBootstrapService.BOOTSTRAP_PLACEHOLDER_PREFIX) Settings.builder(org.opensearch.common.settings.Settings.builder) MockTransport(org.opensearch.test.transport.MockTransport) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Before(org.junit.Before) Collections.emptyMap(java.util.Collections.emptyMap) Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) TransportRequest(org.opensearch.transport.TransportRequest) Collections.emptySet(java.util.Collections.emptySet) Collections.emptyList(java.util.Collections.emptyList) INITIAL_MASTER_NODES_SETTING(org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING) Matchers.allOf(org.hamcrest.Matchers.allOf) OpenSearchTestCase(org.opensearch.test.OpenSearchTestCase) DISCOVERY_SEED_PROVIDERS_SETTING(org.opensearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING) Settings(org.opensearch.common.settings.Settings) UNCONFIGURED_BOOTSTRAP_TIMEOUT_SETTING(org.opensearch.cluster.coordination.ClusterBootstrapService.UNCONFIGURED_BOOTSTRAP_TIMEOUT_SETTING) DiscoveryNodeRole(org.opensearch.cluster.node.DiscoveryNodeRole) TransportService(org.opensearch.transport.TransportService) Collectors(java.util.stream.Collectors) DISCOVERY_SEED_HOSTS_SETTING(org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING) Matchers.startsWith(org.hamcrest.Matchers.startsWith) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) Stream(java.util.stream.Stream) NODE_NAME_SETTING(org.opensearch.node.Node.NODE_NAME_SETTING) Matchers.hasItem(org.hamcrest.Matchers.hasItem) Matchers.containsInAnyOrder(org.hamcrest.Matchers.containsInAnyOrder) Matchers.equalTo(org.hamcrest.Matchers.equalTo) Collections(java.util.Collections) Matchers.containsString(org.hamcrest.Matchers.containsString) DiscoveryModule(org.opensearch.discovery.DiscoveryModule) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) MockTransport(org.opensearch.test.transport.MockTransport) Matchers.containsString(org.hamcrest.Matchers.containsString) Before(org.junit.Before)

Example 5 with TransportRequest

use of org.opensearch.transport.TransportRequest in project OpenSearch by opensearch-project.

the class NodeJoinTests method setupMasterServiceAndCoordinator.

private void setupMasterServiceAndCoordinator(long term, ClusterState initialState, MasterService masterService, ThreadPool threadPool, Random random, NodeHealthService nodeHealthService) {
    if (this.masterService != null || coordinator != null) {
        throw new IllegalStateException("method setupMasterServiceAndCoordinator can only be called once");
    }
    this.masterService = masterService;
    CapturingTransport capturingTransport = new CapturingTransport() {

        @Override
        protected void onSendRequest(long requestId, String action, TransportRequest request, DiscoveryNode destination) {
            if (action.equals(HANDSHAKE_ACTION_NAME)) {
                handleResponse(requestId, new TransportService.HandshakeResponse(destination, initialState.getClusterName(), destination.getVersion()));
            } else if (action.equals(JoinHelper.VALIDATE_JOIN_ACTION_NAME)) {
                handleResponse(requestId, new TransportResponse.Empty());
            } else {
                super.onSendRequest(requestId, action, request, destination);
            }
        }
    };
    final ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
    TransportService transportService = capturingTransport.createTransportService(Settings.EMPTY, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> initialState.nodes().getLocalNode(), clusterSettings, Collections.emptySet());
    coordinator = new Coordinator("test_node", Settings.EMPTY, clusterSettings, transportService, writableRegistry(), OpenSearchAllocationTestCase.createAllocationService(Settings.EMPTY), masterService, () -> new InMemoryPersistedState(term, initialState), r -> emptyList(), new NoOpClusterApplier(), Collections.emptyList(), random, (s, p, r) -> {
    }, ElectionStrategy.DEFAULT_INSTANCE, nodeHealthService);
    transportService.start();
    transportService.acceptIncomingRequests();
    transport = capturingTransport;
    coordinator.start();
    coordinator.startInitialJoin();
}
Also used : Metadata(org.opensearch.cluster.metadata.Metadata) TestThreadPool(org.opensearch.threadpool.TestThreadPool) HANDSHAKE_ACTION_NAME(org.opensearch.transport.TransportService.HANDSHAKE_ACTION_NAME) Version(org.opensearch.Version) Random(java.util.Random) FutureUtils(org.opensearch.common.util.concurrent.FutureUtils) TestTransportChannel(org.opensearch.transport.TestTransportChannel) Collections.singletonList(java.util.Collections.singletonList) Transport(org.opensearch.transport.Transport) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) Collections.singleton(java.util.Collections.singleton) OpenSearchAllocationTestCase(org.opensearch.cluster.OpenSearchAllocationTestCase) After(org.junit.After) ActionListener(org.opensearch.action.ActionListener) AfterClass(org.junit.AfterClass) CyclicBarrier(java.util.concurrent.CyclicBarrier) MasterService(org.opensearch.cluster.service.MasterService) Collections.emptyList(java.util.Collections.emptyList) OpenSearchTestCase(org.opensearch.test.OpenSearchTestCase) NodeHealthService(org.opensearch.monitor.NodeHealthService) Set(java.util.Set) HEALTHY(org.opensearch.monitor.StatusInfo.Status.HEALTHY) Settings(org.opensearch.common.settings.Settings) TransportResponse(org.opensearch.transport.TransportResponse) DiscoveryNodeRole(org.opensearch.cluster.node.DiscoveryNodeRole) TransportService(org.opensearch.transport.TransportService) Collectors(java.util.stream.Collectors) FakeThreadPoolMasterService(org.opensearch.cluster.service.FakeThreadPoolMasterService) List(java.util.List) Stream(java.util.stream.Stream) Randomness(org.opensearch.common.Randomness) Matchers.equalTo(org.hamcrest.Matchers.equalTo) StatusInfo(org.opensearch.monitor.StatusInfo) Optional(java.util.Optional) ClusterServiceUtils(org.opensearch.test.ClusterServiceUtils) Matchers.containsString(org.hamcrest.Matchers.containsString) IntStream(java.util.stream.IntStream) DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) BeforeClass(org.junit.BeforeClass) ThreadPool(org.opensearch.threadpool.ThreadPool) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Node(org.opensearch.node.Node) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) AtomicReference(java.util.concurrent.atomic.AtomicReference) ArrayList(java.util.ArrayList) MasterServiceTests(org.opensearch.cluster.service.MasterServiceTests) ClusterState(org.opensearch.cluster.ClusterState) RequestHandlerRegistry(org.opensearch.transport.RequestHandlerRegistry) ClusterSettings(org.opensearch.common.settings.ClusterSettings) ClusterBlocks(org.opensearch.cluster.block.ClusterBlocks) Collections.emptyMap(java.util.Collections.emptyMap) Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) VotingConfiguration(org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration) TransportRequest(org.opensearch.transport.TransportRequest) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) BaseFuture(org.opensearch.common.util.concurrent.BaseFuture) TimeUnit(java.util.concurrent.TimeUnit) ClusterName(org.opensearch.cluster.ClusterName) CapturingTransport(org.opensearch.test.transport.CapturingTransport) Collections(java.util.Collections) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) ClusterSettings(org.opensearch.common.settings.ClusterSettings) CapturingTransport(org.opensearch.test.transport.CapturingTransport) Matchers.containsString(org.hamcrest.Matchers.containsString) TransportService(org.opensearch.transport.TransportService)

Aggregations

TransportRequest (org.opensearch.transport.TransportRequest)26 DiscoveryNode (org.opensearch.cluster.node.DiscoveryNode)18 Settings (org.opensearch.common.settings.Settings)17 TransportService (org.opensearch.transport.TransportService)16 MockTransport (org.opensearch.test.transport.MockTransport)12 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)11 ConnectTransportException (org.opensearch.transport.ConnectTransportException)11 TransportException (org.opensearch.transport.TransportException)10 StatusInfo (org.opensearch.monitor.StatusInfo)9 IOException (java.io.IOException)7 ArrayList (java.util.ArrayList)7 List (java.util.List)7 OpenSearchException (org.opensearch.OpenSearchException)7 Version (org.opensearch.Version)7 AtomicReference (java.util.concurrent.atomic.AtomicReference)6 Matchers.equalTo (org.hamcrest.Matchers.equalTo)6 OpenSearchTestCase (org.opensearch.test.OpenSearchTestCase)6 Collections (java.util.Collections)5 StreamInput (org.opensearch.common.io.stream.StreamInput)5 TransportRequestOptions (org.opensearch.transport.TransportRequestOptions)5