use of org.elasticsearch.transport.Transport in project elasticsearch by elastic.
the class MockTransportService method createNewService.
public static MockTransportService createNewService(Settings settings, Version version, ThreadPool threadPool, @Nullable ClusterSettings clusterSettings) {
NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry(ClusterModule.getNamedWriteables());
final Transport transport = new MockTcpTransport(settings, threadPool, BigArrays.NON_RECYCLING_INSTANCE, new NoneCircuitBreakerService(), namedWriteableRegistry, new NetworkService(settings, Collections.emptyList()), version);
return createNewService(settings, transport, version, threadPool, clusterSettings);
}
use of org.elasticsearch.transport.Transport in project elasticsearch-suggest-plugin by spinscale.
the class TransportClientTest method getTransportClient.
private TransportClient getTransportClient() {
if (transportClient == null) {
transportClient = new TransportClient(settingsBuilder().put("cluster.name", internalCluster().getClusterName()).put("name", "programmatic_transport_client").put("client.transport.nodes_sampler_interval", "1s").build());
Transport transport = internalCluster().getDataNodeInstance(Transport.class);
transportClient.addTransportAddress(transport.boundAddress().publishAddress());
}
return transportClient;
}
Aggregations