Search in sources :

Example 56 with LatchedActionListener

use of org.opensearch.action.LatchedActionListener in project OpenSearch by opensearch-project.

the class ClusterClientDocumentationIT method testDeleteComponentTemplate.

public void testDeleteComponentTemplate() throws Exception {
    RestHighLevelClient client = highLevelClient();
    {
        PutComponentTemplateRequest request = new PutComponentTemplateRequest().name("ct1");
        Settings settings = Settings.builder().put("index.number_of_shards", 3).put("index.number_of_replicas", 1).build();
        String mappingJson = "{\n" + "  \"properties\": {\n" + "    \"message\": {\n" + "      \"type\": \"text\"\n" + "    }\n" + "  }\n" + "}";
        AliasMetadata twitterAlias = AliasMetadata.builder("twitter_alias").build();
        Map<String, AliasMetadata> aliases = new HashMap<>();
        aliases.put("twitter_alias", twitterAlias);
        Template template = new Template(settings, new CompressedXContent(mappingJson), aliases);
        request.componentTemplate(new ComponentTemplate(template, null, null));
        assertTrue(client.cluster().putComponentTemplate(request, RequestOptions.DEFAULT).isAcknowledged());
    }
    // tag::delete-component-template-request
    // <1>
    DeleteComponentTemplateRequest deleteRequest = new DeleteComponentTemplateRequest("ct1");
    // end::delete-component-template-request
    // tag::delete-component-template-request-masterTimeout
    // <1>
    deleteRequest.setMasterTimeout(TimeValue.timeValueMinutes(1));
    // end::delete-component-template-request-masterTimeout
    // tag::delete-component-template-execute
    AcknowledgedResponse deleteTemplateAcknowledge = client.cluster().deleteComponentTemplate(deleteRequest, RequestOptions.DEFAULT);
    // end::delete-component-template-execute
    // tag::delete-component-template-response
    // <1>
    boolean acknowledged = deleteTemplateAcknowledge.isAcknowledged();
    // end::delete-component-template-response
    assertThat(acknowledged, equalTo(true));
    {
        PutComponentTemplateRequest request = new PutComponentTemplateRequest().name("ct1");
        Settings settings = Settings.builder().put("index.number_of_shards", 3).put("index.number_of_replicas", 1).build();
        Template template = new Template(settings, null, null);
        request.componentTemplate(new ComponentTemplate(template, null, null));
        assertTrue(client.cluster().putComponentTemplate(request, RequestOptions.DEFAULT).isAcknowledged());
    }
    // tag::delete-component-template-execute-listener
    ActionListener<AcknowledgedResponse> listener = new ActionListener<AcknowledgedResponse>() {

        @Override
        public void onResponse(AcknowledgedResponse response) {
        // <1>
        }

        @Override
        public void onFailure(Exception e) {
        // <2>
        }
    };
    // end::delete-component-template-execute-listener
    final CountDownLatch latch = new CountDownLatch(1);
    listener = new LatchedActionListener<>(listener, latch);
    // tag::delete-component-template-execute-async
    // <1>
    client.cluster().deleteComponentTemplateAsync(deleteRequest, RequestOptions.DEFAULT, listener);
    // end::delete-component-template-execute-async
    assertTrue(latch.await(30L, TimeUnit.SECONDS));
}
Also used : AliasMetadata(org.opensearch.cluster.metadata.AliasMetadata) AcknowledgedResponse(org.opensearch.action.support.master.AcknowledgedResponse) RestHighLevelClient(org.opensearch.client.RestHighLevelClient) CountDownLatch(java.util.concurrent.CountDownLatch) IOException(java.io.IOException) PutComponentTemplateRequest(org.opensearch.client.indices.PutComponentTemplateRequest) Template(org.opensearch.cluster.metadata.Template) ComponentTemplate(org.opensearch.cluster.metadata.ComponentTemplate) DeleteComponentTemplateRequest(org.opensearch.client.indices.DeleteComponentTemplateRequest) LatchedActionListener(org.opensearch.action.LatchedActionListener) ActionListener(org.opensearch.action.ActionListener) CompressedXContent(org.opensearch.common.compress.CompressedXContent) ComponentTemplate(org.opensearch.cluster.metadata.ComponentTemplate) HashMap(java.util.HashMap) Map(java.util.Map) RecoverySettings(org.opensearch.indices.recovery.RecoverySettings) Settings(org.opensearch.common.settings.Settings)

Example 57 with LatchedActionListener

use of org.opensearch.action.LatchedActionListener in project OpenSearch by opensearch-project.

the class SearchDocumentationIT method testSearch.

@SuppressWarnings({ "unused", "unchecked" })
public void testSearch() throws Exception {
    indexSearchTestData();
    RestHighLevelClient client = highLevelClient();
    {
        // tag::search-request-basic
        // <1>
        SearchRequest searchRequest = new SearchRequest();
        // <2>
        SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
        // <3>
        searchSourceBuilder.query(QueryBuilders.matchAllQuery());
        // <4>
        searchRequest.source(searchSourceBuilder);
    // end::search-request-basic
    }
    {
        // tag::search-request-indices
        // <1>
        SearchRequest searchRequest = new SearchRequest("posts");
        // end::search-request-indices
        // tag::search-request-routing
        // <1>
        searchRequest.routing("routing");
        // end::search-request-routing
        // tag::search-request-indicesOptions
        // <1>
        searchRequest.indicesOptions(IndicesOptions.lenientExpandOpen());
        // end::search-request-indicesOptions
        // tag::search-request-preference
        // <1>
        searchRequest.preference("_local");
        // end::search-request-preference
        assertNotNull(client.search(searchRequest, RequestOptions.DEFAULT));
    }
    {
        // tag::search-source-basics
        // <1>
        SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
        // <2>
        sourceBuilder.query(QueryBuilders.termQuery("user", "foobar"));
        // <3>
        sourceBuilder.from(0);
        // <4>
        sourceBuilder.size(5);
        // <5>
        sourceBuilder.timeout(new TimeValue(60, TimeUnit.SECONDS));
        // end::search-source-basics
        // tag::search-source-sorting
        // <1>
        sourceBuilder.sort(new ScoreSortBuilder().order(SortOrder.DESC));
        // <2>
        sourceBuilder.sort(new FieldSortBuilder("id").order(SortOrder.ASC));
        // end::search-source-sorting
        // tag::search-source-filtering-off
        sourceBuilder.fetchSource(false);
        // end::search-source-filtering-off
        // tag::search-source-filtering-includes
        String[] includeFields = new String[] { "title", "innerObject.*" };
        String[] excludeFields = new String[] { "user" };
        sourceBuilder.fetchSource(includeFields, excludeFields);
        // end::search-source-filtering-includes
        sourceBuilder.fetchSource(true);
        // tag::search-source-setter
        SearchRequest searchRequest = new SearchRequest();
        searchRequest.indices("posts");
        searchRequest.source(sourceBuilder);
        // end::search-source-setter
        // tag::search-execute
        SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
        // end::search-execute
        // tag::search-execute-listener
        ActionListener<SearchResponse> listener = new ActionListener<SearchResponse>() {

            @Override
            public void onResponse(SearchResponse searchResponse) {
            // <1>
            }

            @Override
            public void onFailure(Exception e) {
            // <2>
            }
        };
        // end::search-execute-listener
        // Replace the empty listener by a blocking listener in test
        final CountDownLatch latch = new CountDownLatch(1);
        listener = new LatchedActionListener<>(listener, latch);
        // tag::search-execute-async
        // <1>
        client.searchAsync(searchRequest, RequestOptions.DEFAULT, listener);
        // end::search-execute-async
        assertTrue(latch.await(30L, TimeUnit.SECONDS));
        // tag::search-response-1
        RestStatus status = searchResponse.status();
        TimeValue took = searchResponse.getTook();
        Boolean terminatedEarly = searchResponse.isTerminatedEarly();
        boolean timedOut = searchResponse.isTimedOut();
        // end::search-response-1
        // tag::search-response-2
        int totalShards = searchResponse.getTotalShards();
        int successfulShards = searchResponse.getSuccessfulShards();
        int failedShards = searchResponse.getFailedShards();
        for (ShardSearchFailure failure : searchResponse.getShardFailures()) {
        // failures should be handled here
        }
        // end::search-response-2
        assertNotNull(searchResponse);
        // tag::search-hits-get
        SearchHits hits = searchResponse.getHits();
        // end::search-hits-get
        // tag::search-hits-info
        TotalHits totalHits = hits.getTotalHits();
        // the total number of hits, must be interpreted in the context of totalHits.relation
        long numHits = totalHits.value;
        // whether the number of hits is accurate (EQUAL_TO) or a lower bound of the total (GREATER_THAN_OR_EQUAL_TO)
        TotalHits.Relation relation = totalHits.relation;
        float maxScore = hits.getMaxScore();
        // end::search-hits-info
        // tag::search-hits-singleHit
        SearchHit[] searchHits = hits.getHits();
        for (SearchHit hit : searchHits) {
        // do something with the SearchHit
        }
        // end::search-hits-singleHit
        for (SearchHit hit : searchHits) {
            // tag::search-hits-singleHit-properties
            String index = hit.getIndex();
            String id = hit.getId();
            float score = hit.getScore();
            // end::search-hits-singleHit-properties
            // tag::search-hits-singleHit-source
            String sourceAsString = hit.getSourceAsString();
            Map<String, Object> sourceAsMap = hit.getSourceAsMap();
            String documentTitle = (String) sourceAsMap.get("title");
            List<Object> users = (List<Object>) sourceAsMap.get("user");
            Map<String, Object> innerObject = (Map<String, Object>) sourceAsMap.get("innerObject");
        // end::search-hits-singleHit-source
        }
        assertEquals(3, numHits);
        assertEquals(TotalHits.Relation.EQUAL_TO, relation);
        assertNotNull(hits.getHits()[0].getSourceAsString());
        assertNotNull(hits.getHits()[0].getSourceAsMap().get("title"));
        assertNotNull(hits.getHits()[0].getSourceAsMap().get("innerObject"));
        assertNull(hits.getHits()[0].getSourceAsMap().get("user"));
    }
}
Also used : TotalHits(org.apache.lucene.search.TotalHits) MultiSearchRequest(org.opensearch.action.search.MultiSearchRequest) SearchRequest(org.opensearch.action.search.SearchRequest) SearchHit(org.opensearch.search.SearchHit) RatedSearchHit(org.opensearch.index.rankeval.RatedSearchHit) FieldSortBuilder(org.opensearch.search.sort.FieldSortBuilder) RestHighLevelClient(org.opensearch.client.RestHighLevelClient) Matchers.containsString(org.hamcrest.Matchers.containsString) CountDownLatch(java.util.concurrent.CountDownLatch) IOException(java.io.IOException) SearchSourceBuilder(org.opensearch.search.builder.SearchSourceBuilder) MultiSearchResponse(org.opensearch.action.search.MultiSearchResponse) SearchResponse(org.opensearch.action.search.SearchResponse) ScoreSortBuilder(org.opensearch.search.sort.ScoreSortBuilder) LatchedActionListener(org.opensearch.action.LatchedActionListener) LatchedActionListener(org.opensearch.action.LatchedActionListener) ActionListener(org.opensearch.action.ActionListener) RestStatus(org.opensearch.rest.RestStatus) ArrayList(java.util.ArrayList) List(java.util.List) ShardSearchFailure(org.opensearch.action.search.ShardSearchFailure) SearchHits(org.opensearch.search.SearchHits) Map(java.util.Map) HashMap(java.util.HashMap) TimeValue(org.opensearch.common.unit.TimeValue)

Example 58 with LatchedActionListener

use of org.opensearch.action.LatchedActionListener in project OpenSearch by opensearch-project.

the class CRUDDocumentationIT method testExists.

public void testExists() throws Exception {
    RestHighLevelClient client = highLevelClient();
    // tag::exists-request
    GetRequest getRequest = new GetRequest(// <1>
    "posts", // <2>
    "1");
    // <3>
    getRequest.fetchSourceContext(new FetchSourceContext(false));
    // <4>
    getRequest.storedFields("_none_");
    // end::exists-request
    {
        // tag::exists-execute
        boolean exists = client.exists(getRequest, RequestOptions.DEFAULT);
        // end::exists-execute
        assertFalse(exists);
    }
    {
        // tag::exists-execute-listener
        ActionListener<Boolean> listener = new ActionListener<Boolean>() {

            @Override
            public void onResponse(Boolean exists) {
            // <1>
            }

            @Override
            public void onFailure(Exception e) {
            // <2>
            }
        };
        // end::exists-execute-listener
        // Replace the empty listener by a blocking listener in test
        final CountDownLatch latch = new CountDownLatch(1);
        listener = new LatchedActionListener<>(listener, latch);
        // tag::exists-execute-async
        // <1>
        client.existsAsync(getRequest, RequestOptions.DEFAULT, listener);
        // end::exists-execute-async
        assertTrue(latch.await(30L, TimeUnit.SECONDS));
    }
}
Also used : LatchedActionListener(org.opensearch.action.LatchedActionListener) FetchSourceContext(org.opensearch.search.fetch.subphase.FetchSourceContext) LatchedActionListener(org.opensearch.action.LatchedActionListener) ActionListener(org.opensearch.action.ActionListener) GetRequest(org.opensearch.action.get.GetRequest) MultiGetRequest(org.opensearch.action.get.MultiGetRequest) RestHighLevelClient(org.opensearch.client.RestHighLevelClient) CountDownLatch(java.util.concurrent.CountDownLatch) OpenSearchException(org.opensearch.OpenSearchException)

Example 59 with LatchedActionListener

use of org.opensearch.action.LatchedActionListener in project OpenSearch by opensearch-project.

the class TransportShardBulkActionTests method testExecuteBulkIndexRequestWithErrorWhileUpdatingMapping.

public void testExecuteBulkIndexRequestWithErrorWhileUpdatingMapping() throws Exception {
    IndexShard shard = newStartedShard(true);
    BulkItemRequest[] items = new BulkItemRequest[1];
    DocWriteRequest<IndexRequest> writeRequest = new IndexRequest("index").id("id").source(Requests.INDEX_CONTENT_TYPE, "foo", "bar");
    items[0] = new BulkItemRequest(0, writeRequest);
    BulkShardRequest bulkShardRequest = new BulkShardRequest(shardId, RefreshPolicy.NONE, items);
    // Return an exception when trying to update the mapping, or when waiting for it to come
    RuntimeException err = new RuntimeException("some kind of exception");
    boolean errorOnWait = randomBoolean();
    randomlySetIgnoredPrimaryResponse(items[0]);
    BulkPrimaryExecutionContext context = new BulkPrimaryExecutionContext(bulkShardRequest, shard);
    final CountDownLatch latch = new CountDownLatch(1);
    TransportShardBulkAction.executeBulkItemRequest(context, null, threadPool::absoluteTimeInMillis, errorOnWait == false ? new ThrowingMappingUpdatePerformer(err) : new NoopMappingUpdatePerformer(), errorOnWait ? listener -> listener.onFailure(err) : listener -> listener.onResponse(null), new LatchedActionListener<>(new ActionListener<Void>() {

        @Override
        public void onResponse(Void aVoid) {
        }

        @Override
        public void onFailure(final Exception e) {
            assertEquals(err, e);
        }
    }, latch));
    latch.await();
    assertFalse(context.hasMoreOperationsToExecute());
    // Translog shouldn't be synced, as there were conflicting mappings
    assertThat(context.getLocationToSync(), nullValue());
    BulkItemResponse primaryResponse = bulkShardRequest.items()[0].getPrimaryResponse();
    // Since this was not a conflict failure, the primary response
    // should be filled out with the failure information
    assertThat(primaryResponse.getItemId(), equalTo(0));
    assertThat(primaryResponse.getId(), equalTo("id"));
    assertThat(primaryResponse.getOpType(), equalTo(DocWriteRequest.OpType.INDEX));
    assertTrue(primaryResponse.isFailed());
    assertThat(primaryResponse.getFailureMessage(), containsString("some kind of exception"));
    BulkItemResponse.Failure failure = primaryResponse.getFailure();
    assertThat(failure.getIndex(), equalTo("index"));
    assertThat(failure.getId(), equalTo("id"));
    assertThat(failure.getCause(), equalTo(err));
    closeShards(shard);
}
Also used : OpenSearchRejectedExecutionException(org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException) IndexResponse(org.opensearch.action.index.IndexResponse) OpenSearchStatusException(org.opensearch.OpenSearchStatusException) TestThreadPool(org.opensearch.threadpool.TestThreadPool) Version(org.opensearch.Version) OpenSearchException(org.opensearch.OpenSearchException) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) IndexShardTestCase(org.opensearch.index.shard.IndexShardTestCase) MapperService(org.opensearch.index.mapper.MapperService) LatchedActionListener(org.opensearch.action.LatchedActionListener) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Mockito.anyBoolean(org.mockito.Mockito.anyBoolean) Matchers.nullValue(org.hamcrest.Matchers.nullValue) ActionListener(org.opensearch.action.ActionListener) DeleteRequest(org.opensearch.action.delete.DeleteRequest) CyclicBarrier(java.util.concurrent.CyclicBarrier) Settings(org.opensearch.common.settings.Settings) RestStatus(org.opensearch.rest.RestStatus) Engine(org.opensearch.index.engine.Engine) CountDownLatch(java.util.concurrent.CountDownLatch) VersionType(org.opensearch.index.VersionType) ActionTestUtils(org.opensearch.action.support.ActionTestUtils) IndexSettings(org.opensearch.index.IndexSettings) MetadataFieldMapper(org.opensearch.index.mapper.MetadataFieldMapper) DocWriteResponse(org.opensearch.action.DocWriteResponse) UpdateRequest(org.opensearch.action.update.UpdateRequest) Mockito.any(org.mockito.Mockito.any) Matchers.containsString(org.hamcrest.Matchers.containsString) RefreshPolicy(org.opensearch.action.support.WriteRequest.RefreshPolicy) Names(org.opensearch.threadpool.ThreadPool.Names) Mockito.eq(org.mockito.Mockito.eq) Mockito.mock(org.mockito.Mockito.mock) Matchers.arrayWithSize(org.hamcrest.Matchers.arrayWithSize) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) CoreMatchers.equalTo(org.hamcrest.CoreMatchers.equalTo) UpdateResponse(org.opensearch.action.update.UpdateResponse) ThreadPool(org.opensearch.threadpool.ThreadPool) CoreMatchers.not(org.hamcrest.CoreMatchers.not) DocWriteRequest(org.opensearch.action.DocWriteRequest) Mockito.spy(org.mockito.Mockito.spy) WritePrimaryResult(org.opensearch.action.support.replication.TransportWriteAction.WritePrimaryResult) Requests(org.opensearch.client.Requests) IndexShard(org.opensearch.index.shard.IndexShard) Mapping(org.opensearch.index.mapper.Mapping) DeleteResponse(org.opensearch.action.delete.DeleteResponse) Translog(org.opensearch.index.translog.Translog) Mockito.anyLong(org.mockito.Mockito.anyLong) Versions(org.opensearch.common.lucene.uid.Versions) UpdateHelper(org.opensearch.action.update.UpdateHelper) VersionConflictEngineException(org.opensearch.index.engine.VersionConflictEngineException) IOException(java.io.IOException) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) RootObjectMapper(org.opensearch.index.mapper.RootObjectMapper) Mockito.verify(org.mockito.Mockito.verify) ShardId(org.opensearch.index.shard.ShardId) IndexRequest(org.opensearch.action.index.IndexRequest) Collections(java.util.Collections) IndexShard(org.opensearch.index.shard.IndexShard) IndexRequest(org.opensearch.action.index.IndexRequest) CountDownLatch(java.util.concurrent.CountDownLatch) OpenSearchRejectedExecutionException(org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException) OpenSearchStatusException(org.opensearch.OpenSearchStatusException) OpenSearchException(org.opensearch.OpenSearchException) VersionConflictEngineException(org.opensearch.index.engine.VersionConflictEngineException) IOException(java.io.IOException) BrokenBarrierException(java.util.concurrent.BrokenBarrierException) LatchedActionListener(org.opensearch.action.LatchedActionListener) ActionListener(org.opensearch.action.ActionListener)

Example 60 with LatchedActionListener

use of org.opensearch.action.LatchedActionListener in project OpenSearch by opensearch-project.

the class ClearScrollControllerTests method testClearAll.

public void testClearAll() throws InterruptedException {
    DiscoveryNode node1 = new DiscoveryNode("node_1", buildNewFakeTransportAddress(), Version.CURRENT);
    DiscoveryNode node2 = new DiscoveryNode("node_2", buildNewFakeTransportAddress(), Version.CURRENT);
    DiscoveryNode node3 = new DiscoveryNode("node_3", buildNewFakeTransportAddress(), Version.CURRENT);
    DiscoveryNodes nodes = DiscoveryNodes.builder().add(node1).add(node2).add(node3).build();
    CountDownLatch latch = new CountDownLatch(1);
    ActionListener<ClearScrollResponse> listener = new LatchedActionListener<>(new ActionListener<ClearScrollResponse>() {

        @Override
        public void onResponse(ClearScrollResponse clearScrollResponse) {
            assertEquals(3, clearScrollResponse.getNumFreed());
            assertTrue(clearScrollResponse.isSucceeded());
        }

        @Override
        public void onFailure(Exception e) {
            throw new AssertionError(e);
        }
    }, latch);
    List<DiscoveryNode> nodesInvoked = new CopyOnWriteArrayList<>();
    SearchTransportService searchTransportService = new SearchTransportService(null, null) {

        @Override
        public void sendClearAllScrollContexts(Transport.Connection connection, ActionListener<TransportResponse> listener) {
            nodesInvoked.add(connection.getNode());
            // response is unused
            Thread t = new Thread(() -> listener.onResponse(TransportResponse.Empty.INSTANCE));
            t.start();
        }

        @Override
        public Transport.Connection getConnection(String clusterAlias, DiscoveryNode node) {
            return new SearchAsyncActionTests.MockConnection(node);
        }
    };
    ClearScrollRequest clearScrollRequest = new ClearScrollRequest();
    clearScrollRequest.scrollIds(Arrays.asList("_all"));
    ClearScrollController controller = new ClearScrollController(clearScrollRequest, listener, nodes, logger, searchTransportService);
    controller.run();
    latch.await();
    assertEquals(3, nodesInvoked.size());
    Collections.sort(nodesInvoked, Comparator.comparing(DiscoveryNode::getId));
    assertEquals(nodesInvoked, Arrays.asList(node1, node2, node3));
}
Also used : DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) CountDownLatch(java.util.concurrent.CountDownLatch) NodeNotConnectedException(org.opensearch.transport.NodeNotConnectedException) IOException(java.io.IOException) LatchedActionListener(org.opensearch.action.LatchedActionListener) LatchedActionListener(org.opensearch.action.LatchedActionListener) ActionListener(org.opensearch.action.ActionListener) Transport(org.opensearch.transport.Transport) DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList)

Aggregations

CountDownLatch (java.util.concurrent.CountDownLatch)63 LatchedActionListener (org.opensearch.action.LatchedActionListener)63 ActionListener (org.opensearch.action.ActionListener)57 IOException (java.io.IOException)43 RestHighLevelClient (org.opensearch.client.RestHighLevelClient)38 OpenSearchException (org.opensearch.OpenSearchException)24 HashMap (java.util.HashMap)20 Map (java.util.Map)19 DefaultShardOperationFailedException (org.opensearch.action.support.DefaultShardOperationFailedException)18 ArrayList (java.util.ArrayList)17 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)16 Matchers.containsString (org.hamcrest.Matchers.containsString)15 Settings (org.opensearch.common.settings.Settings)15 TestThreadPool (org.opensearch.threadpool.TestThreadPool)14 List (java.util.List)12 CreateIndexRequest (org.opensearch.client.indices.CreateIndexRequest)12 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)11 CreateIndexResponse (org.opensearch.client.indices.CreateIndexResponse)11 AcknowledgedResponse (org.opensearch.action.support.master.AcknowledgedResponse)10 DiscoveryNode (org.opensearch.cluster.node.DiscoveryNode)10