Search in sources :

Example 11 with SystemPropertiesElasticSearchConfiguration

use of com.netflix.conductor.elasticsearch.SystemPropertiesElasticSearchConfiguration in project conductor by Netflix.

the class ESRestClientHttpEndToEndTest method setup.

@BeforeClass
public static void setup() throws Exception {
    TestEnvironment.setup();
    System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9203");
    System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "http://localhost:9203");
    System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_INDEX_BATCH_SIZE_PROPERTY_NAME, "1");
    Injector bootInjector = Guice.createInjector(new BootstrapModule());
    Injector serverInjector = Guice.createInjector(bootInjector.getInstance(ModulesProvider.class).get());
    search = serverInjector.getInstance(EmbeddedElasticSearchProvider.class).get().get();
    search.start();
    search.waitForGreenCluster();
    SystemPropertiesElasticSearchConfiguration configuration = new SystemPropertiesElasticSearchConfiguration();
    ElasticSearchRestClientProvider restClientProvider = new ElasticSearchRestClientProvider(configuration);
    elasticSearchAdminClient = restClientProvider.get();
    JettyServer server = new JettyServer(SERVER_PORT, false);
    server.start();
    apiRoot = String.format("http://localhost:%d/api/", SERVER_PORT);
    taskClient = new TaskClient();
    taskClient.setRootURI(apiRoot);
    workflowClient = new WorkflowClient();
    workflowClient.setRootURI(apiRoot);
    metadataClient = new MetadataClient();
    metadataClient.setRootURI(apiRoot);
}
Also used : TaskClient(com.netflix.conductor.client.http.TaskClient) MetadataClient(com.netflix.conductor.client.http.MetadataClient) Injector(com.google.inject.Injector) SystemPropertiesElasticSearchConfiguration(com.netflix.conductor.elasticsearch.SystemPropertiesElasticSearchConfiguration) JettyServer(com.netflix.conductor.jetty.server.JettyServer) WorkflowClient(com.netflix.conductor.client.http.WorkflowClient) EmbeddedElasticSearchProvider(com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider) BootstrapModule(com.netflix.conductor.bootstrap.BootstrapModule) ElasticSearchRestClientProvider(com.netflix.conductor.elasticsearch.ElasticSearchRestClientProvider) BeforeClass(org.junit.BeforeClass)

Aggregations

SystemPropertiesElasticSearchConfiguration (com.netflix.conductor.elasticsearch.SystemPropertiesElasticSearchConfiguration)11 JsonMapperProvider (com.netflix.conductor.common.utils.JsonMapperProvider)10 HashMap (java.util.HashMap)6 BeforeClass (org.junit.BeforeClass)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 ElasticSearchRestClientBuilderProvider (com.netflix.conductor.elasticsearch.ElasticSearchRestClientBuilderProvider)4 ElasticSearchTransportClientProvider (com.netflix.conductor.elasticsearch.ElasticSearchTransportClientProvider)4 EmbeddedElasticSearchV5 (com.netflix.conductor.elasticsearch.es5.EmbeddedElasticSearchV5)4 EmbeddedElasticSearchV6 (com.netflix.conductor.elasticsearch.es6.EmbeddedElasticSearchV6)4 RestClientBuilder (org.elasticsearch.client.RestClientBuilder)4 ElasticSearchRestClientProvider (com.netflix.conductor.elasticsearch.ElasticSearchRestClientProvider)3 EmbeddedElasticSearchV7 (com.netflix.conductor.elasticsearch.es7.EmbeddedElasticSearchV7)2 Request (org.elasticsearch.client.Request)2 RestHighLevelClient (org.elasticsearch.client.RestHighLevelClient)2 Injector (com.google.inject.Injector)1 BootstrapModule (com.netflix.conductor.bootstrap.BootstrapModule)1 MetadataClient (com.netflix.conductor.client.http.MetadataClient)1 TaskClient (com.netflix.conductor.client.http.TaskClient)1 WorkflowClient (com.netflix.conductor.client.http.WorkflowClient)1 EmbeddedElasticSearchProvider (com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider)1