Search in sources :

Example 6 with IndexNotFoundException

use of org.opensearch.index.IndexNotFoundException in project OpenSearch by opensearch-project.

the class TransportClusterHealthAction method prepareResponse.

static int prepareResponse(final ClusterHealthRequest request, final ClusterHealthResponse response, final ClusterState clusterState, final IndexNameExpressionResolver indexNameExpressionResolver) {
    int waitForCounter = 0;
    if (request.waitForStatus() != null && response.getStatus().value() <= request.waitForStatus().value()) {
        waitForCounter++;
    }
    if (request.waitForNoRelocatingShards() && response.getRelocatingShards() == 0) {
        waitForCounter++;
    }
    if (request.waitForNoInitializingShards() && response.getInitializingShards() == 0) {
        waitForCounter++;
    }
    if (request.waitForActiveShards().equals(ActiveShardCount.NONE) == false) {
        ActiveShardCount waitForActiveShards = request.waitForActiveShards();
        assert waitForActiveShards.equals(ActiveShardCount.DEFAULT) == false : "waitForActiveShards must not be DEFAULT on the request object, instead it should be NONE";
        if (waitForActiveShards.equals(ActiveShardCount.ALL)) {
            if (response.getUnassignedShards() == 0 && response.getInitializingShards() == 0) {
                // if we are waiting for all shards to be active, then the num of unassigned and num of initializing shards must be 0
                waitForCounter++;
            }
        } else if (waitForActiveShards.enoughShardsActive(response.getActiveShards())) {
            // there are enough active shards to meet the requirements of the request
            waitForCounter++;
        }
    }
    if (CollectionUtils.isEmpty(request.indices()) == false) {
        try {
            indexNameExpressionResolver.concreteIndexNames(clusterState, IndicesOptions.strictExpand(), request);
            waitForCounter++;
        } catch (IndexNotFoundException e) {
            // no indices, make sure its RED
            response.setStatus(ClusterHealthStatus.RED);
        // missing indices, wait a bit more...
        }
    }
    if (!request.waitForNodes().isEmpty()) {
        if (request.waitForNodes().startsWith(">=")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(2));
            if (response.getNumberOfNodes() >= expected) {
                waitForCounter++;
            }
        } else if (request.waitForNodes().startsWith("ge(")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(3, request.waitForNodes().length() - 1));
            if (response.getNumberOfNodes() >= expected) {
                waitForCounter++;
            }
        } else if (request.waitForNodes().startsWith("<=")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(2));
            if (response.getNumberOfNodes() <= expected) {
                waitForCounter++;
            }
        } else if (request.waitForNodes().startsWith("le(")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(3, request.waitForNodes().length() - 1));
            if (response.getNumberOfNodes() <= expected) {
                waitForCounter++;
            }
        } else if (request.waitForNodes().startsWith(">")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(1));
            if (response.getNumberOfNodes() > expected) {
                waitForCounter++;
            }
        } else if (request.waitForNodes().startsWith("gt(")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(3, request.waitForNodes().length() - 1));
            if (response.getNumberOfNodes() > expected) {
                waitForCounter++;
            }
        } else if (request.waitForNodes().startsWith("<")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(1));
            if (response.getNumberOfNodes() < expected) {
                waitForCounter++;
            }
        } else if (request.waitForNodes().startsWith("lt(")) {
            int expected = Integer.parseInt(request.waitForNodes().substring(3, request.waitForNodes().length() - 1));
            if (response.getNumberOfNodes() < expected) {
                waitForCounter++;
            }
        } else {
            int expected = Integer.parseInt(request.waitForNodes());
            if (response.getNumberOfNodes() == expected) {
                waitForCounter++;
            }
        }
    }
    return waitForCounter;
}
Also used : IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ActiveShardCount(org.opensearch.action.support.ActiveShardCount)

Example 7 with IndexNotFoundException

use of org.opensearch.index.IndexNotFoundException in project OpenSearch by opensearch-project.

the class TransportBulkAction method doInternalExecute.

protected void doInternalExecute(Task task, BulkRequest bulkRequest, String executorName, ActionListener<BulkResponse> listener) {
    final long startTime = relativeTime();
    final AtomicArray<BulkItemResponse> responses = new AtomicArray<>(bulkRequest.requests.size());
    boolean hasIndexRequestsWithPipelines = false;
    final Metadata metadata = clusterService.state().getMetadata();
    final Version minNodeVersion = clusterService.state().getNodes().getMinNodeVersion();
    for (DocWriteRequest<?> actionRequest : bulkRequest.requests) {
        IndexRequest indexRequest = getIndexWriteRequest(actionRequest);
        if (indexRequest != null) {
            // Each index request needs to be evaluated, because this method also modifies the IndexRequest
            boolean indexRequestHasPipeline = IngestService.resolvePipelines(actionRequest, indexRequest, metadata);
            hasIndexRequestsWithPipelines |= indexRequestHasPipeline;
        }
        if (actionRequest instanceof IndexRequest) {
            IndexRequest ir = (IndexRequest) actionRequest;
            ir.checkAutoIdWithOpTypeCreateSupportedByVersion(minNodeVersion);
            if (ir.getAutoGeneratedTimestamp() != IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP) {
                throw new IllegalArgumentException("autoGeneratedTimestamp should not be set externally");
            }
        }
    }
    if (hasIndexRequestsWithPipelines) {
        // this path is never taken.
        try {
            if (Assertions.ENABLED) {
                final boolean arePipelinesResolved = bulkRequest.requests().stream().map(TransportBulkAction::getIndexWriteRequest).filter(Objects::nonNull).allMatch(IndexRequest::isPipelineResolved);
                assert arePipelinesResolved : bulkRequest;
            }
            if (clusterService.localNode().isIngestNode()) {
                processBulkIndexIngestRequest(task, bulkRequest, executorName, listener);
            } else {
                ingestForwarder.forwardIngestRequest(BulkAction.INSTANCE, bulkRequest, listener);
            }
        } catch (Exception e) {
            listener.onFailure(e);
        }
        return;
    }
    final boolean includesSystem = includesSystem(bulkRequest, clusterService.state().metadata().getIndicesLookup(), systemIndices);
    if (includesSystem || needToCheck()) {
        // Attempt to create all the indices that we're going to need during the bulk before we start.
        // Step 1: collect all the indices in the request
        final Map<String, Boolean> indices = bulkRequest.requests.stream().filter(request -> request.opType() != DocWriteRequest.OpType.DELETE || request.versionType() == VersionType.EXTERNAL || request.versionType() == VersionType.EXTERNAL_GTE).collect(Collectors.toMap(DocWriteRequest::index, DocWriteRequest::isRequireAlias, (v1, v2) -> v1 || v2));
        /* Step 2: filter that to indices that don't exist and we can create. At the same time build a map of indices we can't create
             * that we'll use when we try to run the requests. */
        final Map<String, IndexNotFoundException> indicesThatCannotBeCreated = new HashMap<>();
        Set<String> autoCreateIndices = new HashSet<>();
        ClusterState state = clusterService.state();
        for (Map.Entry<String, Boolean> indexAndFlag : indices.entrySet()) {
            boolean shouldAutoCreate;
            final String index = indexAndFlag.getKey();
            try {
                shouldAutoCreate = shouldAutoCreate(index, state);
            } catch (IndexNotFoundException e) {
                shouldAutoCreate = false;
                indicesThatCannotBeCreated.put(index, e);
            }
            // We should only auto create if we are not requiring it to be an alias
            if (shouldAutoCreate && (indexAndFlag.getValue() == false)) {
                autoCreateIndices.add(index);
            }
        }
        // Step 3: create all the indices that are missing, if there are any missing. start the bulk after all the creates come back.
        if (autoCreateIndices.isEmpty()) {
            executeBulk(task, bulkRequest, startTime, listener, responses, indicesThatCannotBeCreated);
        } else {
            final AtomicInteger counter = new AtomicInteger(autoCreateIndices.size());
            for (String index : autoCreateIndices) {
                createIndex(index, bulkRequest.timeout(), minNodeVersion, new ActionListener<CreateIndexResponse>() {

                    @Override
                    public void onResponse(CreateIndexResponse result) {
                        if (counter.decrementAndGet() == 0) {
                            threadPool.executor(executorName).execute(new ActionRunnable<BulkResponse>(listener) {

                                @Override
                                protected void doRun() {
                                    executeBulk(task, bulkRequest, startTime, listener, responses, indicesThatCannotBeCreated);
                                }
                            });
                        }
                    }

                    @Override
                    public void onFailure(Exception e) {
                        if (!(ExceptionsHelper.unwrapCause(e) instanceof ResourceAlreadyExistsException)) {
                            // fail all requests involving this index, if create didn't work
                            for (int i = 0; i < bulkRequest.requests.size(); i++) {
                                DocWriteRequest<?> request = bulkRequest.requests.get(i);
                                if (request != null && setResponseFailureIfIndexMatches(responses, i, request, index, e)) {
                                    bulkRequest.requests.set(i, null);
                                }
                            }
                        }
                        if (counter.decrementAndGet() == 0) {
                            final ActionListener<BulkResponse> wrappedListener = ActionListener.wrap(listener::onResponse, inner -> {
                                inner.addSuppressed(e);
                                listener.onFailure(inner);
                            });
                            threadPool.executor(executorName).execute(new ActionRunnable<BulkResponse>(wrappedListener) {

                                @Override
                                protected void doRun() {
                                    executeBulk(task, bulkRequest, startTime, wrappedListener, responses, indicesThatCannotBeCreated);
                                }

                                @Override
                                public void onRejection(Exception rejectedException) {
                                    rejectedException.addSuppressed(e);
                                    super.onRejection(rejectedException);
                                }
                            });
                        }
                    }
                });
            }
        }
    } else {
        executeBulk(task, bulkRequest, startTime, listener, responses, emptyMap());
    }
}
Also used : SequenceNumbers(org.opensearch.index.seqno.SequenceNumbers) IndexAbstraction(org.opensearch.cluster.metadata.IndexAbstraction) Metadata(org.opensearch.cluster.metadata.Metadata) LongSupplier(java.util.function.LongSupplier) DataStream(org.opensearch.cluster.metadata.DataStream) Version(org.opensearch.Version) TransportUpdateAction(org.opensearch.action.update.TransportUpdateAction) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Locale(java.util.Locale) Assertions(org.opensearch.Assertions) Map(java.util.Map) NodeClosedException(org.opensearch.node.NodeClosedException) AutoCreateAction(org.opensearch.action.admin.indices.create.AutoCreateAction) Inject(org.opensearch.common.inject.Inject) ActionListener(org.opensearch.action.ActionListener) AtomicIntegerArray(java.util.concurrent.atomic.AtomicIntegerArray) CreateIndexRequest(org.opensearch.action.admin.indices.create.CreateIndexRequest) TimeValue(org.opensearch.common.unit.TimeValue) NodeClient(org.opensearch.client.node.NodeClient) Index(org.opensearch.index.Index) IndexingPressureService(org.opensearch.index.IndexingPressureService) OpenSearchParseException(org.opensearch.OpenSearchParseException) ExceptionsHelper(org.opensearch.ExceptionsHelper) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) Set(java.util.Set) Task(org.opensearch.tasks.Task) TransportService(org.opensearch.transport.TransportService) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) ActionFilters(org.opensearch.action.support.ActionFilters) VersionType(org.opensearch.index.VersionType) List(java.util.List) Logger(org.apache.logging.log4j.Logger) SparseFixedBitSet(org.apache.lucene.util.SparseFixedBitSet) EXCLUDED_DATA_STREAMS_KEY(org.opensearch.cluster.metadata.IndexNameExpressionResolver.EXCLUDED_DATA_STREAMS_KEY) ResourceAlreadyExistsException(org.opensearch.ResourceAlreadyExistsException) DocWriteResponse(org.opensearch.action.DocWriteResponse) UpdateRequest(org.opensearch.action.update.UpdateRequest) SortedMap(java.util.SortedMap) IndexNameExpressionResolver(org.opensearch.cluster.metadata.IndexNameExpressionResolver) Names(org.opensearch.threadpool.ThreadPool.Names) MappingMetadata(org.opensearch.cluster.metadata.MappingMetadata) HandledTransportAction(org.opensearch.action.support.HandledTransportAction) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) ActionRunnable(org.opensearch.action.ActionRunnable) UpdateResponse(org.opensearch.action.update.UpdateResponse) ThreadPool(org.opensearch.threadpool.ThreadPool) RoutingMissingException(org.opensearch.action.RoutingMissingException) DocWriteRequest(org.opensearch.action.DocWriteRequest) HashMap(java.util.HashMap) Releasable(org.opensearch.common.lease.Releasable) ArrayList(java.util.ArrayList) AutoCreateIndex(org.opensearch.action.support.AutoCreateIndex) HashSet(java.util.HashSet) ClusterState(org.opensearch.cluster.ClusterState) UNASSIGNED_SEQ_NO(org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO) LegacyESVersion(org.opensearch.LegacyESVersion) IndexClosedException(org.opensearch.indices.IndexClosedException) ClusterStateObserver(org.opensearch.cluster.ClusterStateObserver) Collections.emptyMap(java.util.Collections.emptyMap) IngestService(org.opensearch.ingest.IngestService) Iterator(java.util.Iterator) IngestActionForwarder(org.opensearch.action.ingest.IngestActionForwarder) ClusterBlockLevel(org.opensearch.cluster.block.ClusterBlockLevel) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) CreateIndexResponse(org.opensearch.action.admin.indices.create.CreateIndexResponse) UNASSIGNED_PRIMARY_TERM(org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_PRIMARY_TERM) ShardId(org.opensearch.index.shard.ShardId) TimeUnit(java.util.concurrent.TimeUnit) SystemIndices(org.opensearch.indices.SystemIndices) AtomicArray(org.opensearch.common.util.concurrent.AtomicArray) ClusterService(org.opensearch.cluster.service.ClusterService) IndexRequest(org.opensearch.action.index.IndexRequest) LogManager(org.apache.logging.log4j.LogManager) AtomicArray(org.opensearch.common.util.concurrent.AtomicArray) ActionRunnable(org.opensearch.action.ActionRunnable) HashMap(java.util.HashMap) Metadata(org.opensearch.cluster.metadata.Metadata) MappingMetadata(org.opensearch.cluster.metadata.MappingMetadata) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) CreateIndexRequest(org.opensearch.action.admin.indices.create.CreateIndexRequest) IndexRequest(org.opensearch.action.index.IndexRequest) Version(org.opensearch.Version) LegacyESVersion(org.opensearch.LegacyESVersion) CreateIndexResponse(org.opensearch.action.admin.indices.create.CreateIndexResponse) HashSet(java.util.HashSet) ClusterState(org.opensearch.cluster.ClusterState) ResourceAlreadyExistsException(org.opensearch.ResourceAlreadyExistsException) NodeClosedException(org.opensearch.node.NodeClosedException) OpenSearchParseException(org.opensearch.OpenSearchParseException) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) ResourceAlreadyExistsException(org.opensearch.ResourceAlreadyExistsException) RoutingMissingException(org.opensearch.action.RoutingMissingException) IndexClosedException(org.opensearch.indices.IndexClosedException) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ActionListener(org.opensearch.action.ActionListener) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) DocWriteRequest(org.opensearch.action.DocWriteRequest) Map(java.util.Map) SortedMap(java.util.SortedMap) HashMap(java.util.HashMap) Collections.emptyMap(java.util.Collections.emptyMap)

Example 8 with IndexNotFoundException

use of org.opensearch.index.IndexNotFoundException in project OpenSearch by opensearch-project.

the class CloseIndexIT method testCloseOneMissingIndex.

public void testCloseOneMissingIndex() {
    createIndex("test1");
    final IndexNotFoundException e = expectThrows(IndexNotFoundException.class, () -> client().admin().indices().prepareClose("test1", "test2").get());
    assertThat(e.getMessage(), is("no such index [test2]"));
}
Also used : IndexNotFoundException(org.opensearch.index.IndexNotFoundException)

Example 9 with IndexNotFoundException

use of org.opensearch.index.IndexNotFoundException in project OpenSearch by opensearch-project.

the class IndicesOptionsIntegrationIT method verify.

private static void verify(ActionRequestBuilder<?, ?> requestBuilder, boolean fail, long expectedCount) {
    if (fail) {
        if (requestBuilder instanceof MultiSearchRequestBuilder) {
            MultiSearchResponse multiSearchResponse = ((MultiSearchRequestBuilder) requestBuilder).get();
            assertThat(multiSearchResponse.getResponses().length, equalTo(1));
            assertThat(multiSearchResponse.getResponses()[0].isFailure(), is(true));
            assertThat(multiSearchResponse.getResponses()[0].getResponse(), nullValue());
        } else {
            try {
                requestBuilder.get();
                fail("IndexNotFoundException or IndexClosedException was expected");
            } catch (IndexNotFoundException | IndexClosedException e) {
            }
        }
    } else {
        if (requestBuilder instanceof SearchRequestBuilder) {
            SearchRequestBuilder searchRequestBuilder = (SearchRequestBuilder) requestBuilder;
            assertHitCount(searchRequestBuilder.get(), expectedCount);
        } else if (requestBuilder instanceof MultiSearchRequestBuilder) {
            MultiSearchResponse multiSearchResponse = ((MultiSearchRequestBuilder) requestBuilder).get();
            assertThat(multiSearchResponse.getResponses().length, equalTo(1));
            assertThat(multiSearchResponse.getResponses()[0].getResponse(), notNullValue());
        } else {
            requestBuilder.get();
        }
    }
}
Also used : MultiSearchResponse(org.opensearch.action.search.MultiSearchResponse) SearchRequestBuilder(org.opensearch.action.search.SearchRequestBuilder) MultiSearchRequestBuilder(org.opensearch.action.search.MultiSearchRequestBuilder) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) MultiSearchRequestBuilder(org.opensearch.action.search.MultiSearchRequestBuilder)

Example 10 with IndexNotFoundException

use of org.opensearch.index.IndexNotFoundException in project OpenSearch by opensearch-project.

the class CloseIndexIT method assertException.

static void assertException(final Throwable throwable, final String indexName) {
    final Throwable t = ExceptionsHelper.unwrapCause(throwable);
    if (t instanceof ClusterBlockException) {
        ClusterBlockException clusterBlockException = (ClusterBlockException) t;
        assertThat(clusterBlockException.blocks(), hasSize(1));
        assertTrue(clusterBlockException.blocks().stream().allMatch(b -> b.id() == MetadataIndexStateService.INDEX_CLOSED_BLOCK_ID));
    } else if (t instanceof IndexClosedException) {
        IndexClosedException indexClosedException = (IndexClosedException) t;
        assertThat(indexClosedException.getIndex(), notNullValue());
        assertThat(indexClosedException.getIndex().getName(), equalTo(indexName));
    } else if (t instanceof IndexNotFoundException) {
        IndexNotFoundException indexNotFoundException = (IndexNotFoundException) t;
        assertThat(indexNotFoundException.getIndex(), notNullValue());
        assertThat(indexNotFoundException.getIndex().getName(), equalTo(indexName));
    } else {
        fail("Unexpected exception: " + t);
    }
}
Also used : IntStream(java.util.stream.IntStream) Arrays(java.util.Arrays) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) Matchers.not(org.hamcrest.Matchers.not) ByteSizeUnit(org.opensearch.common.unit.ByteSizeUnit) ByteSizeValue(org.opensearch.common.unit.ByteSizeValue) InternalTestCluster(org.opensearch.test.InternalTestCluster) ActionRequestValidationException(org.opensearch.action.ActionRequestValidationException) ArrayList(java.util.ArrayList) CloseIndexResponse(org.opensearch.action.admin.indices.close.CloseIndexResponse) ClusterState(org.opensearch.cluster.ClusterState) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) IndexShard(org.opensearch.index.shard.IndexShard) OpenSearchAssertions.assertHitCount(org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount) IndexClosedException(org.opensearch.indices.IndexClosedException) RecoveryState(org.opensearch.indices.recovery.RecoveryState) Locale(java.util.Locale) Matchers.nullValue(org.hamcrest.Matchers.nullValue) Matchers.hasSize(org.hamcrest.Matchers.hasSize) BackgroundIndexer(org.opensearch.test.BackgroundIndexer) ClusterHealthStatus(org.opensearch.cluster.health.ClusterHealthStatus) MetadataIndexStateService(org.opensearch.cluster.metadata.MetadataIndexStateService) TRACK_TOTAL_HITS_ACCURATE(org.opensearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE) IndicesOptions.lenientExpandOpen(org.opensearch.action.support.IndicesOptions.lenientExpandOpen) OpenSearchAssertions.assertAcked(org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked) Client(org.opensearch.client.Client) Matchers.empty(org.hamcrest.Matchers.empty) Collections.emptySet(java.util.Collections.emptySet) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) CloseIndexRequestBuilder(org.opensearch.action.admin.indices.close.CloseIndexRequestBuilder) IndicesService(org.opensearch.indices.IndicesService) ExceptionsHelper(org.opensearch.ExceptionsHelper) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) Settings(org.opensearch.common.settings.Settings) Collectors(java.util.stream.Collectors) ActiveShardCount(org.opensearch.action.support.ActiveShardCount) ShardRouting(org.opensearch.cluster.routing.ShardRouting) CountDownLatch(java.util.concurrent.CountDownLatch) Sets(org.opensearch.common.util.set.Sets) List(java.util.List) Collectors.toList(java.util.stream.Collectors.toList) Matchers.equalTo(org.hamcrest.Matchers.equalTo) IndexSettings(org.opensearch.index.IndexSettings) Matchers.is(org.hamcrest.Matchers.is) OpenSearchIntegTestCase(org.opensearch.test.OpenSearchIntegTestCase) Matchers.containsString(org.hamcrest.Matchers.containsString) IndexClosedException(org.opensearch.indices.IndexClosedException) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException)

Aggregations

IndexNotFoundException (org.opensearch.index.IndexNotFoundException)99 ActionListener (org.opensearch.action.ActionListener)32 ClusterState (org.opensearch.cluster.ClusterState)26 ThreadContext (org.opensearch.common.util.concurrent.ThreadContext)25 IOException (java.io.IOException)24 Client (org.opensearch.client.Client)23 ArrayList (java.util.ArrayList)21 Map (java.util.Map)20 Logger (org.apache.logging.log4j.Logger)20 List (java.util.List)19 LogManager (org.apache.logging.log4j.LogManager)19 HashMap (java.util.HashMap)18 GetRequest (org.opensearch.action.get.GetRequest)18 AnomalyDetector (org.opensearch.ad.model.AnomalyDetector)18 Settings (org.opensearch.common.settings.Settings)18 NamedXContentRegistry (org.opensearch.common.xcontent.NamedXContentRegistry)18 ClusterService (org.opensearch.cluster.service.ClusterService)17 Optional (java.util.Optional)15 XContentParser (org.opensearch.common.xcontent.XContentParser)15 DeleteRequest (org.opensearch.action.delete.DeleteRequest)14