use of com.netflix.conductor.elasticsearch.ElasticSearchTransportClientProvider in project conductor by Netflix.
the class TestElasticSearchDAOV5 method startElasticSearchWithBatchSize.
private void startElasticSearchWithBatchSize(int i) throws Exception {
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_INDEX_BATCH_SIZE_PROPERTY_NAME, String.valueOf(i));
configuration = new SystemPropertiesElasticSearchConfiguration();
String host = configuration.getEmbeddedHost();
int port = configuration.getEmbeddedPort();
String clusterName = configuration.getEmbeddedClusterName();
embeddedElasticSearch = new EmbeddedElasticSearchV5(clusterName, host, port);
embeddedElasticSearch.start();
ElasticSearchTransportClientProvider transportClientProvider = new ElasticSearchTransportClientProvider(configuration);
elasticSearchClient = transportClientProvider.get();
elasticSearchClient.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().get();
ObjectMapper objectMapper = new JsonMapperProvider().get();
indexDAO = new ElasticSearchDAOV5(elasticSearchClient, configuration, objectMapper);
}
use of com.netflix.conductor.elasticsearch.ElasticSearchTransportClientProvider in project conductor by Netflix.
the class TestElasticSearchDAOV5 method startServer.
@BeforeClass
public static void startServer() throws Exception {
System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9203");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "localhost:9303");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_INDEX_BATCH_SIZE_PROPERTY_NAME, "1");
configuration = new SystemPropertiesElasticSearchConfiguration();
String host = configuration.getEmbeddedHost();
int port = configuration.getEmbeddedPort();
String clusterName = configuration.getEmbeddedClusterName();
embeddedElasticSearch = new EmbeddedElasticSearchV5(clusterName, host, port);
embeddedElasticSearch.start();
ElasticSearchTransportClientProvider transportClientProvider = new ElasticSearchTransportClientProvider(configuration);
elasticSearchClient = transportClientProvider.get();
elasticSearchClient.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().get();
ObjectMapper objectMapper = new JsonMapperProvider().get();
indexDAO = new ElasticSearchDAOV5(elasticSearchClient, configuration, objectMapper);
}
use of com.netflix.conductor.elasticsearch.ElasticSearchTransportClientProvider in project conductor by Netflix.
the class TestElasticSearchDAOV6 method startElasticSearchWithBatchSize.
private void startElasticSearchWithBatchSize(int i) throws Exception {
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_INDEX_BATCH_SIZE_PROPERTY_NAME, String.valueOf(i));
configuration = new SystemPropertiesElasticSearchConfiguration();
String host = configuration.getEmbeddedHost();
int port = configuration.getEmbeddedPort();
String clusterName = configuration.getEmbeddedClusterName();
embeddedElasticSearch = new EmbeddedElasticSearchV6(clusterName, host, port);
embeddedElasticSearch.start();
ElasticSearchTransportClientProvider transportClientProvider = new ElasticSearchTransportClientProvider(configuration);
elasticSearchClient = transportClientProvider.get();
elasticSearchClient.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().get();
ObjectMapper objectMapper = new JsonMapperProvider().get();
indexDAO = new ElasticSearchDAOV6(elasticSearchClient, configuration, objectMapper);
}
use of com.netflix.conductor.elasticsearch.ElasticSearchTransportClientProvider in project conductor by Netflix.
the class TestElasticSearchDAOV6 method startServer.
@BeforeClass
public static void startServer() throws Exception {
System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9203");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "localhost:9303");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_INDEX_BATCH_SIZE_PROPERTY_NAME, "1");
configuration = new SystemPropertiesElasticSearchConfiguration();
String host = configuration.getEmbeddedHost();
int port = configuration.getEmbeddedPort();
String clusterName = configuration.getEmbeddedClusterName();
embeddedElasticSearch = new EmbeddedElasticSearchV6(clusterName, host, port);
embeddedElasticSearch.start();
ElasticSearchTransportClientProvider transportClientProvider = new ElasticSearchTransportClientProvider(configuration);
elasticSearchClient = transportClientProvider.get();
elasticSearchClient.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().get();
ObjectMapper objectMapper = new JsonMapperProvider().get();
indexDAO = new ElasticSearchDAOV6(elasticSearchClient, configuration, objectMapper);
}
Aggregations