Search in sources :

Example 26 with NetworkService

use of org.elasticsearch.common.network.NetworkService in project elasticsearch by elastic.

the class Netty4HttpChannelTests method setup.

@Before
public void setup() throws Exception {
    networkService = new NetworkService(Settings.EMPTY, Collections.emptyList());
    threadPool = new TestThreadPool("test");
    bigArrays = new MockBigArrays(Settings.EMPTY, new NoneCircuitBreakerService());
}
Also used : NetworkService(org.elasticsearch.common.network.NetworkService) MockBigArrays(org.elasticsearch.common.util.MockBigArrays) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService) Before(org.junit.Before)

Example 27 with NetworkService

use of org.elasticsearch.common.network.NetworkService in project elasticsearch by elastic.

the class Netty4ScheduledPingTests method testScheduledPing.

public void testScheduledPing() throws Exception {
    ThreadPool threadPool = new TestThreadPool(getClass().getName());
    Settings settings = Settings.builder().put(TcpTransport.PING_SCHEDULE.getKey(), "5ms").put(TransportSettings.PORT.getKey(), 0).put("cluster.name", "test").build();
    CircuitBreakerService circuitBreakerService = new NoneCircuitBreakerService();
    NamedWriteableRegistry registry = new NamedWriteableRegistry(Collections.emptyList());
    final Netty4Transport nettyA = new Netty4Transport(settings, threadPool, new NetworkService(settings, Collections.emptyList()), BigArrays.NON_RECYCLING_INSTANCE, registry, circuitBreakerService);
    MockTransportService serviceA = new MockTransportService(settings, nettyA, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, null);
    serviceA.start();
    serviceA.acceptIncomingRequests();
    final Netty4Transport nettyB = new Netty4Transport(settings, threadPool, new NetworkService(settings, Collections.emptyList()), BigArrays.NON_RECYCLING_INSTANCE, registry, circuitBreakerService);
    MockTransportService serviceB = new MockTransportService(settings, nettyB, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, null);
    serviceB.start();
    serviceB.acceptIncomingRequests();
    DiscoveryNode nodeA = serviceA.getLocalDiscoNode();
    DiscoveryNode nodeB = serviceB.getLocalDiscoNode();
    serviceA.connectToNode(nodeB);
    serviceB.connectToNode(nodeA);
    assertBusy(new Runnable() {

        @Override
        public void run() {
            assertThat(nettyA.getPing().getSuccessfulPings(), greaterThan(100L));
            assertThat(nettyB.getPing().getSuccessfulPings(), greaterThan(100L));
        }
    });
    assertThat(nettyA.getPing().getFailedPings(), equalTo(0L));
    assertThat(nettyB.getPing().getFailedPings(), equalTo(0L));
    serviceA.registerRequestHandler("sayHello", TransportRequest.Empty::new, ThreadPool.Names.GENERIC, new TransportRequestHandler<TransportRequest.Empty>() {

        @Override
        public void messageReceived(TransportRequest.Empty request, TransportChannel channel) {
            try {
                channel.sendResponse(TransportResponse.Empty.INSTANCE, TransportResponseOptions.EMPTY);
            } catch (IOException e) {
                logger.error("Unexpected failure", e);
                fail(e.getMessage());
            }
        }
    });
    int rounds = scaledRandomIntBetween(100, 5000);
    for (int i = 0; i < rounds; i++) {
        serviceB.submitRequest(nodeA, "sayHello", TransportRequest.Empty.INSTANCE, TransportRequestOptions.builder().withCompress(randomBoolean()).build(), new TransportResponseHandler<TransportResponse.Empty>() {

            @Override
            public TransportResponse.Empty newInstance() {
                return TransportResponse.Empty.INSTANCE;
            }

            @Override
            public String executor() {
                return ThreadPool.Names.GENERIC;
            }

            @Override
            public void handleResponse(TransportResponse.Empty response) {
            }

            @Override
            public void handleException(TransportException exp) {
                logger.error("Unexpected failure", exp);
                fail("got exception instead of a response: " + exp.getMessage());
            }
        }).txGet();
    }
    assertBusy(() -> {
        assertThat(nettyA.getPing().getSuccessfulPings(), greaterThan(200L));
        assertThat(nettyB.getPing().getSuccessfulPings(), greaterThan(200L));
    });
    assertThat(nettyA.getPing().getFailedPings(), equalTo(0L));
    assertThat(nettyB.getPing().getFailedPings(), equalTo(0L));
    Releasables.close(serviceA, serviceB);
    terminate(threadPool);
}
Also used : NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) TransportRequest(org.elasticsearch.transport.TransportRequest) MockTransportService(org.elasticsearch.test.transport.MockTransportService) ThreadPool(org.elasticsearch.threadpool.ThreadPool) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) TransportResponseHandler(org.elasticsearch.transport.TransportResponseHandler) IOException(java.io.IOException) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) TransportResponse(org.elasticsearch.transport.TransportResponse) TransportException(org.elasticsearch.transport.TransportException) NetworkService(org.elasticsearch.common.network.NetworkService) TransportChannel(org.elasticsearch.transport.TransportChannel) CircuitBreakerService(org.elasticsearch.indices.breaker.CircuitBreakerService) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService) Settings(org.elasticsearch.common.settings.Settings) TransportSettings(org.elasticsearch.transport.TransportSettings) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService)

Example 28 with NetworkService

use of org.elasticsearch.common.network.NetworkService in project elasticsearch by elastic.

the class UnicastZenPingTests method testSimplePings.

public void testSimplePings() throws IOException, InterruptedException, ExecutionException {
    // use ephemeral ports
    final Settings settings = Settings.builder().put("cluster.name", "test").put(TransportSettings.PORT.getKey(), 0).build();
    final Settings settingsMismatch = Settings.builder().put(settings).put("cluster.name", "mismatch").put(TransportSettings.PORT.getKey(), 0).build();
    NetworkService networkService = new NetworkService(settings, Collections.emptyList());
    final BiFunction<Settings, Version, Transport> supplier = (s, v) -> new MockTcpTransport(s, threadPool, BigArrays.NON_RECYCLING_INSTANCE, new NoneCircuitBreakerService(), new NamedWriteableRegistry(Collections.emptyList()), networkService, v) {

        @Override
        public void connectToNode(DiscoveryNode node, ConnectionProfile connectionProfile, CheckedBiConsumer<Connection, ConnectionProfile, IOException> connectionValidator) throws ConnectTransportException {
            throw new AssertionError("zen pings should never connect to node (got [" + node + "])");
        }
    };
    NetworkHandle handleA = startServices(settings, threadPool, "UZP_A", Version.CURRENT, supplier);
    closeables.push(handleA.transportService);
    NetworkHandle handleB = startServices(settings, threadPool, "UZP_B", Version.CURRENT, supplier);
    closeables.push(handleB.transportService);
    NetworkHandle handleC = startServices(settingsMismatch, threadPool, "UZP_C", Version.CURRENT, supplier);
    closeables.push(handleC.transportService);
    final Version versionD;
    if (randomBoolean()) {
        versionD = VersionUtils.randomVersionBetween(random(), Version.CURRENT.minimumCompatibilityVersion(), Version.CURRENT);
    } else {
        versionD = Version.CURRENT;
    }
    logger.info("UZP_D version set to [{}]", versionD);
    NetworkHandle handleD = startServices(settingsMismatch, threadPool, "UZP_D", versionD, supplier);
    closeables.push(handleD.transportService);
    final ClusterState state = ClusterState.builder(new ClusterName("test")).version(randomNonNegativeLong()).build();
    final ClusterState stateMismatch = ClusterState.builder(new ClusterName("mismatch")).version(randomNonNegativeLong()).build();
    Settings hostsSettings = Settings.builder().putArray("discovery.zen.ping.unicast.hosts", NetworkAddress.format(new InetSocketAddress(handleA.address.address().getAddress(), handleA.address.address().getPort())), NetworkAddress.format(new InetSocketAddress(handleB.address.address().getAddress(), handleB.address.address().getPort())), NetworkAddress.format(new InetSocketAddress(handleC.address.address().getAddress(), handleC.address.address().getPort())), NetworkAddress.format(new InetSocketAddress(handleD.address.address().getAddress(), handleD.address.address().getPort()))).put("cluster.name", "test").build();
    Settings hostsSettingsMismatch = Settings.builder().put(hostsSettings).put(settingsMismatch).build();
    TestUnicastZenPing zenPingA = new TestUnicastZenPing(hostsSettings, threadPool, handleA, EMPTY_HOSTS_PROVIDER);
    zenPingA.start(new PingContextProvider() {

        @Override
        public DiscoveryNodes nodes() {
            return DiscoveryNodes.builder().add(handleA.node).localNodeId("UZP_A").build();
        }

        @Override
        public ClusterState clusterState() {
            return ClusterState.builder(state).blocks(ClusterBlocks.builder().addGlobalBlock(STATE_NOT_RECOVERED_BLOCK)).build();
        }
    });
    closeables.push(zenPingA);
    TestUnicastZenPing zenPingB = new TestUnicastZenPing(hostsSettings, threadPool, handleB, EMPTY_HOSTS_PROVIDER);
    zenPingB.start(new PingContextProvider() {

        @Override
        public DiscoveryNodes nodes() {
            return DiscoveryNodes.builder().add(handleB.node).localNodeId("UZP_B").build();
        }

        @Override
        public ClusterState clusterState() {
            return state;
        }
    });
    closeables.push(zenPingB);
    TestUnicastZenPing zenPingC = new TestUnicastZenPing(hostsSettingsMismatch, threadPool, handleC, EMPTY_HOSTS_PROVIDER) {

        @Override
        protected Version getVersion() {
            return versionD;
        }
    };
    zenPingC.start(new PingContextProvider() {

        @Override
        public DiscoveryNodes nodes() {
            return DiscoveryNodes.builder().add(handleC.node).localNodeId("UZP_C").build();
        }

        @Override
        public ClusterState clusterState() {
            return stateMismatch;
        }
    });
    closeables.push(zenPingC);
    TestUnicastZenPing zenPingD = new TestUnicastZenPing(hostsSettingsMismatch, threadPool, handleD, EMPTY_HOSTS_PROVIDER);
    zenPingD.start(new PingContextProvider() {

        @Override
        public DiscoveryNodes nodes() {
            return DiscoveryNodes.builder().add(handleD.node).localNodeId("UZP_D").build();
        }

        @Override
        public ClusterState clusterState() {
            return stateMismatch;
        }
    });
    closeables.push(zenPingD);
    logger.info("ping from UZP_A");
    Collection<ZenPing.PingResponse> pingResponses = zenPingA.pingAndWait().toList();
    assertThat(pingResponses.size(), equalTo(1));
    ZenPing.PingResponse ping = pingResponses.iterator().next();
    assertThat(ping.node().getId(), equalTo("UZP_B"));
    assertThat(ping.getClusterStateVersion(), equalTo(state.version()));
    assertPingCount(handleA, handleB, 3);
    // mismatch, shouldn't ping
    assertPingCount(handleA, handleC, 0);
    // mismatch, shouldn't ping
    assertPingCount(handleA, handleD, 0);
    // ping again, this time from B,
    logger.info("ping from UZP_B");
    pingResponses = zenPingB.pingAndWait().toList();
    assertThat(pingResponses.size(), equalTo(1));
    ping = pingResponses.iterator().next();
    assertThat(ping.node().getId(), equalTo("UZP_A"));
    assertThat(ping.getClusterStateVersion(), equalTo(ElectMasterService.MasterCandidate.UNRECOVERED_CLUSTER_VERSION));
    assertPingCount(handleB, handleA, 3);
    // mismatch, shouldn't ping
    assertPingCount(handleB, handleC, 0);
    // mismatch, shouldn't ping
    assertPingCount(handleB, handleD, 0);
    logger.info("ping from UZP_C");
    pingResponses = zenPingC.pingAndWait().toList();
    assertThat(pingResponses.size(), equalTo(1));
    assertPingCount(handleC, handleA, 0);
    assertPingCount(handleC, handleB, 0);
    assertPingCount(handleC, handleD, 3);
    logger.info("ping from UZP_D");
    pingResponses = zenPingD.pingAndWait().toList();
    assertThat(pingResponses.size(), equalTo(1));
    assertPingCount(handleD, handleA, 0);
    assertPingCount(handleD, handleB, 0);
    assertPingCount(handleD, handleC, 3);
}
Also used : Arrays(java.util.Arrays) BigArrays(org.elasticsearch.common.util.BigArrays) ConcurrentCollections(org.elasticsearch.common.util.concurrent.ConcurrentCollections) BiFunction(java.util.function.BiFunction) ClusterBlocks(org.elasticsearch.cluster.block.ClusterBlocks) InetAddress(java.net.InetAddress) STATE_NOT_RECOVERED_BLOCK(org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK) ClusterState(org.elasticsearch.cluster.ClusterState) ConnectTransportException(org.elasticsearch.transport.ConnectTransportException) Settings(org.elasticsearch.common.settings.Settings) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) Matchers.eq(org.mockito.Matchers.eq) After(org.junit.After) Map(java.util.Map) ThreadPool(org.elasticsearch.threadpool.ThreadPool) ClusterName(org.elasticsearch.cluster.ClusterName) Role(org.elasticsearch.cluster.node.DiscoveryNode.Role) ThreadFactory(java.util.concurrent.ThreadFactory) EnumSet(java.util.EnumSet) Transport(org.elasticsearch.transport.Transport) Collection(java.util.Collection) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) Set(java.util.Set) InetSocketAddress(java.net.InetSocketAddress) Collectors(java.util.stream.Collectors) CountDownLatch(java.util.concurrent.CountDownLatch) AbstractRunnable(org.elasticsearch.common.util.concurrent.AbstractRunnable) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Version(org.elasticsearch.Version) TransportAddress(org.elasticsearch.common.transport.TransportAddress) TransportConnectionListener(org.elasticsearch.transport.TransportConnectionListener) TransportSettings(org.elasticsearch.transport.TransportSettings) Matchers.equalTo(org.hamcrest.Matchers.equalTo) TransportResponseHandler(org.elasticsearch.transport.TransportResponseHandler) TransportRequestOptions(org.elasticsearch.transport.TransportRequestOptions) TransportException(org.elasticsearch.transport.TransportException) NetworkAddress(org.elasticsearch.common.network.NetworkAddress) Mockito.mock(org.mockito.Mockito.mock) IntStream(java.util.stream.IntStream) Matchers(org.mockito.Matchers) HashMap(java.util.HashMap) BoundTransportAddress(org.elasticsearch.common.transport.BoundTransportAddress) AtomicReference(java.util.concurrent.atomic.AtomicReference) CheckedBiConsumer(org.elasticsearch.common.CheckedBiConsumer) Stack(java.util.Stack) ArrayList(java.util.ArrayList) ConcurrentMap(java.util.concurrent.ConcurrentMap) HashSet(java.util.HashSet) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) NetworkService(org.elasticsearch.common.network.NetworkService) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService) NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) TimeValue(org.elasticsearch.common.unit.TimeValue) Matchers.hasSize(org.hamcrest.Matchers.hasSize) ESTestCase(org.elasticsearch.test.ESTestCase) MockTransportService(org.elasticsearch.test.transport.MockTransportService) TransportService(org.elasticsearch.transport.TransportService) ExecutorService(java.util.concurrent.ExecutorService) Before(org.junit.Before) ConnectionProfile(org.elasticsearch.transport.ConnectionProfile) Collections.emptyMap(java.util.Collections.emptyMap) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) Matchers.empty(org.hamcrest.Matchers.empty) EsExecutors(org.elasticsearch.common.util.concurrent.EsExecutors) Collections.emptySet(java.util.Collections.emptySet) IOUtils(org.apache.lucene.util.IOUtils) IOException(java.io.IOException) UnknownHostException(java.net.UnknownHostException) VersionUtils(org.elasticsearch.test.VersionUtils) Mockito.verify(org.mockito.Mockito.verify) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Closeable(java.io.Closeable) Collections(java.util.Collections) NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) CheckedBiConsumer(org.elasticsearch.common.CheckedBiConsumer) InetSocketAddress(java.net.InetSocketAddress) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) Version(org.elasticsearch.Version) ClusterName(org.elasticsearch.cluster.ClusterName) Settings(org.elasticsearch.common.settings.Settings) TransportSettings(org.elasticsearch.transport.TransportSettings) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) ClusterState(org.elasticsearch.cluster.ClusterState) ConnectionProfile(org.elasticsearch.transport.ConnectionProfile) NetworkService(org.elasticsearch.common.network.NetworkService) Transport(org.elasticsearch.transport.Transport) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService)

Example 29 with NetworkService

use of org.elasticsearch.common.network.NetworkService in project elasticsearch by elastic.

the class UnicastZenPingTests method testInvalidHosts.

public void testInvalidHosts() throws InterruptedException {
    final Logger logger = mock(Logger.class);
    final NetworkService networkService = new NetworkService(Settings.EMPTY, Collections.emptyList());
    final Transport transport = new MockTcpTransport(Settings.EMPTY, threadPool, BigArrays.NON_RECYCLING_INSTANCE, new NoneCircuitBreakerService(), new NamedWriteableRegistry(Collections.emptyList()), networkService, Version.CURRENT) {

        @Override
        public BoundTransportAddress boundAddress() {
            return new BoundTransportAddress(new TransportAddress[] { new TransportAddress(InetAddress.getLoopbackAddress(), 9300) }, new TransportAddress(InetAddress.getLoopbackAddress(), 9300));
        }
    };
    closeables.push(transport);
    final TransportService transportService = new TransportService(Settings.EMPTY, transport, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> null, null);
    closeables.push(transportService);
    final List<DiscoveryNode> discoveryNodes = TestUnicastZenPing.resolveHostsLists(executorService, logger, Arrays.asList("127.0.0.1:9300:9300", "127.0.0.1:9301"), 1, transportService, "test_", TimeValue.timeValueSeconds(1));
    // only one of the two is valid and will be used
    assertThat(discoveryNodes, hasSize(1));
    assertThat(discoveryNodes.get(0).getAddress().getAddress(), equalTo("127.0.0.1"));
    assertThat(discoveryNodes.get(0).getAddress().getPort(), equalTo(9301));
    verify(logger).warn(eq("failed to resolve host [127.0.0.1:9300:9300]"), Matchers.any(ExecutionException.class));
}
Also used : NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) MockTransportService(org.elasticsearch.test.transport.MockTransportService) TransportService(org.elasticsearch.transport.TransportService) TransportAddress(org.elasticsearch.common.transport.TransportAddress) BoundTransportAddress(org.elasticsearch.common.transport.BoundTransportAddress) BoundTransportAddress(org.elasticsearch.common.transport.BoundTransportAddress) NetworkService(org.elasticsearch.common.network.NetworkService) Logger(org.apache.logging.log4j.Logger) Transport(org.elasticsearch.transport.Transport) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) ExecutionException(java.util.concurrent.ExecutionException) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService)

Example 30 with NetworkService

use of org.elasticsearch.common.network.NetworkService in project elasticsearch by elastic.

the class UnicastZenPingTests method testResolveTimeout.

public void testResolveTimeout() throws InterruptedException {
    final Logger logger = mock(Logger.class);
    final NetworkService networkService = new NetworkService(Settings.EMPTY, Collections.emptyList());
    final CountDownLatch latch = new CountDownLatch(1);
    final Transport transport = new MockTcpTransport(Settings.EMPTY, threadPool, BigArrays.NON_RECYCLING_INSTANCE, new NoneCircuitBreakerService(), new NamedWriteableRegistry(Collections.emptyList()), networkService, Version.CURRENT) {

        @Override
        public BoundTransportAddress boundAddress() {
            return new BoundTransportAddress(new TransportAddress[] { new TransportAddress(InetAddress.getLoopbackAddress(), 9500) }, new TransportAddress(InetAddress.getLoopbackAddress(), 9500));
        }

        @Override
        public TransportAddress[] addressesFromString(String address, int perAddressLimit) throws UnknownHostException {
            if ("hostname1".equals(address)) {
                return new TransportAddress[] { new TransportAddress(TransportAddress.META_ADDRESS, 9300) };
            } else if ("hostname2".equals(address)) {
                try {
                    latch.await();
                    return new TransportAddress[] { new TransportAddress(TransportAddress.META_ADDRESS, 9300) };
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            } else {
                throw new UnknownHostException(address);
            }
        }
    };
    closeables.push(transport);
    final TransportService transportService = new TransportService(Settings.EMPTY, transport, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> null, null);
    closeables.push(transportService);
    final TimeValue resolveTimeout = TimeValue.timeValueSeconds(randomIntBetween(1, 3));
    try {
        final List<DiscoveryNode> discoveryNodes = TestUnicastZenPing.resolveHostsLists(executorService, logger, Arrays.asList("hostname1", "hostname2"), 1, transportService, "test+", resolveTimeout);
        assertThat(discoveryNodes, hasSize(1));
        verify(logger).trace("resolved host [{}] to {}", "hostname1", new TransportAddress[] { new TransportAddress(TransportAddress.META_ADDRESS, 9300) });
        verify(logger).warn("timed out after [{}] resolving host [{}]", resolveTimeout, "hostname2");
        verifyNoMoreInteractions(logger);
    } finally {
        latch.countDown();
    }
}
Also used : NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) UnknownHostException(java.net.UnknownHostException) TransportAddress(org.elasticsearch.common.transport.TransportAddress) BoundTransportAddress(org.elasticsearch.common.transport.BoundTransportAddress) Logger(org.apache.logging.log4j.Logger) CountDownLatch(java.util.concurrent.CountDownLatch) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) MockTransportService(org.elasticsearch.test.transport.MockTransportService) TransportService(org.elasticsearch.transport.TransportService) BoundTransportAddress(org.elasticsearch.common.transport.BoundTransportAddress) NetworkService(org.elasticsearch.common.network.NetworkService) Transport(org.elasticsearch.transport.Transport) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) TimeValue(org.elasticsearch.common.unit.TimeValue) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService)

Aggregations

NetworkService (org.elasticsearch.common.network.NetworkService)38 NoneCircuitBreakerService (org.elasticsearch.indices.breaker.NoneCircuitBreakerService)26 NamedWriteableRegistry (org.elasticsearch.common.io.stream.NamedWriteableRegistry)25 DiscoveryNode (org.elasticsearch.cluster.node.DiscoveryNode)19 Settings (org.elasticsearch.common.settings.Settings)19 MockTransportService (org.elasticsearch.test.transport.MockTransportService)17 IOException (java.io.IOException)15 MockTcpTransport (org.elasticsearch.transport.MockTcpTransport)15 Transport (org.elasticsearch.transport.Transport)14 TransportAddress (org.elasticsearch.common.transport.TransportAddress)13 Before (org.junit.Before)13 TestThreadPool (org.elasticsearch.threadpool.TestThreadPool)12 TransportService (org.elasticsearch.transport.TransportService)12 BigArrays (org.elasticsearch.common.util.BigArrays)11 ThreadPool (org.elasticsearch.threadpool.ThreadPool)11 BoundTransportAddress (org.elasticsearch.common.transport.BoundTransportAddress)10 TimeValue (org.elasticsearch.common.unit.TimeValue)10 Collections (java.util.Collections)9 TimeUnit (java.util.concurrent.TimeUnit)9 Logger (org.apache.logging.log4j.Logger)9