Search in sources :

Example 1 with ClusterBlockException

use of org.opensearch.cluster.block.ClusterBlockException in project OpenSearch by opensearch-project.

the class MockDiskUsagesIT method testAutomaticReleaseOfIndexBlock.

public void testAutomaticReleaseOfIndexBlock() throws Exception {
    for (int i = 0; i < 3; i++) {
        // ensure that each node has a single data path
        internalCluster().startNode(Settings.builder().put(Environment.PATH_DATA_SETTING.getKey(), createTempDir()));
    }
    final List<String> nodeIds = StreamSupport.stream(client().admin().cluster().prepareState().get().getState().getRoutingNodes().spliterator(), false).map(RoutingNode::nodeId).collect(Collectors.toList());
    final MockInternalClusterInfoService clusterInfoService = getMockInternalClusterInfoService();
    clusterInfoService.setUpdateFrequency(TimeValue.timeValueMillis(200));
    // prevent any effects from in-flight recoveries, since we are only simulating a 100-byte disk
    clusterInfoService.setShardSizeFunctionAndRefresh(shardRouting -> 0L);
    // start with all nodes below the low watermark
    clusterInfoService.setDiskUsageFunctionAndRefresh((discoveryNode, fsInfoPath) -> setDiskUsage(fsInfoPath, 100, between(15, 100)));
    // we have to consistently use bytes or percentage for the disk watermark settings
    final boolean watermarkBytes = randomBoolean();
    assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().put(CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), watermarkBytes ? "10b" : "90%").put(CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), watermarkBytes ? "10b" : "90%").put(CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING.getKey(), watermarkBytes ? "5b" : "95%").put(CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING.getKey(), "150ms")));
    // Create an index with 6 shards so we can check allocation for it
    prepareCreate("test").setSettings(Settings.builder().put("number_of_shards", 6).put("number_of_replicas", 0)).get();
    ensureGreen("test");
    {
        final Map<String, Integer> shardCountByNodeId = getShardCountByNodeId();
        assertThat("node0 has 2 shards", shardCountByNodeId.get(nodeIds.get(0)), equalTo(2));
        assertThat("node1 has 2 shards", shardCountByNodeId.get(nodeIds.get(1)), equalTo(2));
        assertThat("node2 has 2 shards", shardCountByNodeId.get(nodeIds.get(2)), equalTo(2));
    }
    client().prepareIndex("test").setId("1").setSource("foo", "bar").setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE).get();
    assertSearchHits(client().prepareSearch("test").get(), "1");
    // Move all nodes above the low watermark so no shard movement can occur, and at least one node above the flood stage watermark so
    // the index is blocked
    clusterInfoService.setDiskUsageFunctionAndRefresh((discoveryNode, fsInfoPath) -> setDiskUsage(fsInfoPath, 100, discoveryNode.getId().equals(nodeIds.get(2)) ? between(0, 4) : between(0, 9)));
    assertBusy(() -> assertBlocked(client().prepareIndex().setIndex("test").setId("1").setSource("foo", "bar"), IndexMetadata.INDEX_READ_ONLY_ALLOW_DELETE_BLOCK));
    assertFalse(client().admin().cluster().prepareHealth("test").setWaitForEvents(Priority.LANGUID).get().isTimedOut());
    // Cannot add further documents
    assertBlocked(client().prepareIndex().setIndex("test").setId("2").setSource("foo", "bar"), IndexMetadata.INDEX_READ_ONLY_ALLOW_DELETE_BLOCK);
    assertSearchHits(client().prepareSearch("test").get(), "1");
    logger.info("--> index is confirmed read-only, releasing disk space");
    // Move all nodes below the high watermark so that the index is unblocked
    clusterInfoService.setDiskUsageFunctionAndRefresh((discoveryNode, fsInfoPath) -> setDiskUsage(fsInfoPath, 100, between(10, 100)));
    // Attempt to create a new document until DiskUsageMonitor unblocks the index
    assertBusy(() -> {
        try {
            client().prepareIndex("test").setId("3").setSource("foo", "bar").setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE).get();
        } catch (ClusterBlockException e) {
            throw new AssertionError("retrying", e);
        }
    });
    assertSearchHits(client().prepareSearch("test").get(), "1", "3");
}
Also used : MockInternalClusterInfoService(org.opensearch.cluster.MockInternalClusterInfoService) HashMap(java.util.HashMap) Map(java.util.Map) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException)

Example 2 with ClusterBlockException

use of org.opensearch.cluster.block.ClusterBlockException in project OpenSearch by opensearch-project.

the class InternalClusterInfoService method refresh.

/**
 * Refreshes the ClusterInfo in a blocking fashion
 */
public final ClusterInfo refresh() {
    logger.trace("refreshing cluster info");
    final CountDownLatch nodeLatch = updateNodeStats(new ActionListener<NodesStatsResponse>() {

        @Override
        public void onResponse(NodesStatsResponse nodesStatsResponse) {
            ImmutableOpenMap.Builder<String, DiskUsage> leastAvailableUsagesBuilder = ImmutableOpenMap.builder();
            ImmutableOpenMap.Builder<String, DiskUsage> mostAvailableUsagesBuilder = ImmutableOpenMap.builder();
            fillDiskUsagePerNode(logger, adjustNodesStats(nodesStatsResponse.getNodes()), leastAvailableUsagesBuilder, mostAvailableUsagesBuilder);
            leastAvailableSpaceUsages = leastAvailableUsagesBuilder.build();
            mostAvailableSpaceUsages = mostAvailableUsagesBuilder.build();
        }

        @Override
        public void onFailure(Exception e) {
            if (e instanceof ReceiveTimeoutTransportException) {
                logger.error("NodeStatsAction timed out for ClusterInfoUpdateJob", e);
            } else {
                if (e instanceof ClusterBlockException) {
                    if (logger.isTraceEnabled()) {
                        logger.trace("Failed to execute NodeStatsAction for ClusterInfoUpdateJob", e);
                    }
                } else {
                    logger.warn("Failed to execute NodeStatsAction for ClusterInfoUpdateJob", e);
                }
                // we empty the usages list, to be safe - we don't know what's going on.
                leastAvailableSpaceUsages = ImmutableOpenMap.of();
                mostAvailableSpaceUsages = ImmutableOpenMap.of();
            }
        }
    });
    final CountDownLatch indicesLatch = updateIndicesStats(new ActionListener<IndicesStatsResponse>() {

        @Override
        public void onResponse(IndicesStatsResponse indicesStatsResponse) {
            final ShardStats[] stats = indicesStatsResponse.getShards();
            final ImmutableOpenMap.Builder<String, Long> shardSizeByIdentifierBuilder = ImmutableOpenMap.builder();
            final ImmutableOpenMap.Builder<ShardRouting, String> dataPathByShardRoutingBuilder = ImmutableOpenMap.builder();
            final Map<ClusterInfo.NodeAndPath, ClusterInfo.ReservedSpace.Builder> reservedSpaceBuilders = new HashMap<>();
            buildShardLevelInfo(logger, stats, shardSizeByIdentifierBuilder, dataPathByShardRoutingBuilder, reservedSpaceBuilders);
            final ImmutableOpenMap.Builder<ClusterInfo.NodeAndPath, ClusterInfo.ReservedSpace> rsrvdSpace = ImmutableOpenMap.builder();
            reservedSpaceBuilders.forEach((nodeAndPath, builder) -> rsrvdSpace.put(nodeAndPath, builder.build()));
            indicesStatsSummary = new IndicesStatsSummary(shardSizeByIdentifierBuilder.build(), dataPathByShardRoutingBuilder.build(), rsrvdSpace.build());
        }

        @Override
        public void onFailure(Exception e) {
            if (e instanceof ReceiveTimeoutTransportException) {
                logger.error("IndicesStatsAction timed out for ClusterInfoUpdateJob", e);
            } else {
                if (e instanceof ClusterBlockException) {
                    if (logger.isTraceEnabled()) {
                        logger.trace("Failed to execute IndicesStatsAction for ClusterInfoUpdateJob", e);
                    }
                } else {
                    logger.warn("Failed to execute IndicesStatsAction for ClusterInfoUpdateJob", e);
                }
                // we empty the usages list, to be safe - we don't know what's going on.
                indicesStatsSummary = IndicesStatsSummary.EMPTY;
            }
        }
    });
    try {
        if (nodeLatch.await(fetchTimeout.getMillis(), TimeUnit.MILLISECONDS) == false) {
            logger.warn("Failed to update node information for ClusterInfoUpdateJob within {} timeout", fetchTimeout);
        }
    } catch (InterruptedException e) {
        // restore interrupt status
        Thread.currentThread().interrupt();
    }
    try {
        if (indicesLatch.await(fetchTimeout.getMillis(), TimeUnit.MILLISECONDS) == false) {
            logger.warn("Failed to update shard information for ClusterInfoUpdateJob within {} timeout", fetchTimeout);
        }
    } catch (InterruptedException e) {
        // restore interrupt status
        Thread.currentThread().interrupt();
    }
    ClusterInfo clusterInfo = getClusterInfo();
    boolean anyListeners = false;
    for (final Consumer<ClusterInfo> listener : listeners) {
        anyListeners = true;
        try {
            logger.trace("notifying [{}] of new cluster info", listener);
            listener.accept(clusterInfo);
        } catch (Exception e) {
            logger.info(new ParameterizedMessage("failed to notify [{}] of new cluster info", listener), e);
        }
    }
    assert anyListeners : "expected to notify at least one listener";
    return clusterInfo;
}
Also used : OpenSearchRejectedExecutionException(org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException) ImmutableOpenMap(org.opensearch.common.collect.ImmutableOpenMap) AbstractRunnable(org.opensearch.common.util.concurrent.AbstractRunnable) ThreadPool(org.opensearch.threadpool.ThreadPool) Level(org.apache.logging.log4j.Level) HashMap(java.util.HashMap) IndicesOptions(org.opensearch.action.support.IndicesOptions) DiskThresholdSettings(org.opensearch.cluster.routing.allocation.DiskThresholdSettings) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) AtomicReference(java.util.concurrent.atomic.AtomicReference) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) LatchedActionListener(org.opensearch.action.LatchedActionListener) Property(org.opensearch.common.settings.Setting.Property) Map(java.util.Map) ActionListener(org.opensearch.action.ActionListener) ClusterSettings(org.opensearch.common.settings.ClusterSettings) StoreStats(org.opensearch.index.store.StoreStats) Client(org.opensearch.client.Client) Setting(org.opensearch.common.settings.Setting) TimeValue(org.opensearch.common.unit.TimeValue) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) Settings(org.opensearch.common.settings.Settings) IndicesStatsRequest(org.opensearch.action.admin.indices.stats.IndicesStatsRequest) ShardRouting(org.opensearch.cluster.routing.ShardRouting) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Logger(org.apache.logging.log4j.Logger) NodesStatsResponse(org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse) ClusterService(org.opensearch.cluster.service.ClusterService) NodeStats(org.opensearch.action.admin.cluster.node.stats.NodeStats) NodesStatsRequest(org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest) IndicesStatsResponse(org.opensearch.action.admin.indices.stats.IndicesStatsResponse) ShardStats(org.opensearch.action.admin.indices.stats.ShardStats) LogManager(org.apache.logging.log4j.LogManager) ReceiveTimeoutTransportException(org.opensearch.transport.ReceiveTimeoutTransportException) FsInfo(org.opensearch.monitor.fs.FsInfo) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) IndicesStatsResponse(org.opensearch.action.admin.indices.stats.IndicesStatsResponse) CountDownLatch(java.util.concurrent.CountDownLatch) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) OpenSearchRejectedExecutionException(org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) ReceiveTimeoutTransportException(org.opensearch.transport.ReceiveTimeoutTransportException) NodesStatsResponse(org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse) ReceiveTimeoutTransportException(org.opensearch.transport.ReceiveTimeoutTransportException) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) ImmutableOpenMap(org.opensearch.common.collect.ImmutableOpenMap) HashMap(java.util.HashMap) Map(java.util.Map)

Example 3 with ClusterBlockException

use of org.opensearch.cluster.block.ClusterBlockException 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)

Example 4 with ClusterBlockException

use of org.opensearch.cluster.block.ClusterBlockException in project OpenSearch by opensearch-project.

the class TransportReplicationAction method blockExceptions.

private ClusterBlockException blockExceptions(final ClusterState state, final String indexName) {
    ClusterBlockLevel globalBlockLevel = globalBlockLevel();
    if (globalBlockLevel != null) {
        ClusterBlockException blockException = state.blocks().globalBlockedException(globalBlockLevel);
        if (blockException != null) {
            return blockException;
        }
    }
    ClusterBlockLevel indexBlockLevel = indexBlockLevel();
    if (indexBlockLevel != null) {
        ClusterBlockException blockException = state.blocks().indexBlockedException(indexBlockLevel, indexName);
        if (blockException != null) {
            return blockException;
        }
    }
    return null;
}
Also used : ClusterBlockLevel(org.opensearch.cluster.block.ClusterBlockLevel) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException)

Example 5 with ClusterBlockException

use of org.opensearch.cluster.block.ClusterBlockException in project OpenSearch by opensearch-project.

the class SimpleBlocksIT method testAddBlockWhileIndexingDocuments.

public void testAddBlockWhileIndexingDocuments() throws Exception {
    final String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
    createIndex(indexName);
    final APIBlock block = randomAddableBlock();
    int nbDocs = 0;
    try {
        try (BackgroundIndexer indexer = new BackgroundIndexer(indexName, "_doc", client(), 1000)) {
            indexer.setFailureAssertion(t -> {
                Throwable cause = ExceptionsHelper.unwrapCause(t);
                assertThat(cause, instanceOf(ClusterBlockException.class));
                ClusterBlockException e = (ClusterBlockException) cause;
                assertThat(e.blocks(), hasSize(1));
                assertTrue(e.blocks().stream().allMatch(b -> b.id() == block.getBlock().id()));
            });
            waitForDocs(randomIntBetween(10, 50), indexer);
            assertAcked(client().admin().indices().prepareAddBlock(block, indexName));
            indexer.stopAndAwaitStopped();
            nbDocs += indexer.totalIndexedDocs();
        }
        assertIndexHasBlock(block, indexName);
    } finally {
        disableIndexBlock(indexName, block);
    }
    refresh(indexName);
    assertHitCount(client().prepareSearch(indexName).setSize(0).setTrackTotalHitsUpTo(TRACK_TOTAL_HITS_ACCURATE).get(), nbDocs);
}
Also used : IndexRequestBuilder(org.opensearch.action.index.IndexRequestBuilder) IntStream(java.util.stream.IntStream) APIBlock(org.opensearch.cluster.metadata.IndexMetadata.APIBlock) Arrays(java.util.Arrays) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) IndexResponse(org.opensearch.action.index.IndexResponse) HashMap(java.util.HashMap) ActionRequestValidationException(org.opensearch.action.ActionRequestValidationException) AddIndexBlockRequestBuilder(org.opensearch.action.admin.indices.readonly.AddIndexBlockRequestBuilder) ArrayList(java.util.ArrayList) ClusterState(org.opensearch.cluster.ClusterState) OpenSearchAssertions.assertHitCount(org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount) Locale(java.util.Locale) Matchers.hasSize(org.hamcrest.Matchers.hasSize) BackgroundIndexer(org.opensearch.test.BackgroundIndexer) 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) OpenSearchAssertions.assertBlocked(org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked) Collections.emptySet(java.util.Collections.emptySet) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) ClusterBlockLevel(org.opensearch.cluster.block.ClusterBlockLevel) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ExceptionsHelper(org.opensearch.ExceptionsHelper) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException) Settings(org.opensearch.common.settings.Settings) CreateIndexResponse(org.opensearch.action.admin.indices.create.CreateIndexResponse) ActiveShardCount(org.opensearch.action.support.ActiveShardCount) AcknowledgedResponse(org.opensearch.action.support.master.AcknowledgedResponse) ShardRouting(org.opensearch.cluster.routing.ShardRouting) Consumer(java.util.function.Consumer) SETTING_READ_ONLY(org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Collectors.toList(java.util.stream.Collectors.toList) SETTING_BLOCKS_WRITE(org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE) Matchers.equalTo(org.hamcrest.Matchers.equalTo) UpdateSettingsRequestBuilder(org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequestBuilder) Matchers.is(org.hamcrest.Matchers.is) IndicesExistsResponse(org.opensearch.action.admin.indices.exists.indices.IndicesExistsResponse) OpenSearchIntegTestCase(org.opensearch.test.OpenSearchIntegTestCase) Matchers.containsString(org.hamcrest.Matchers.containsString) BackgroundIndexer(org.opensearch.test.BackgroundIndexer) APIBlock(org.opensearch.cluster.metadata.IndexMetadata.APIBlock) Matchers.containsString(org.hamcrest.Matchers.containsString) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException)

Aggregations

ClusterBlockException (org.opensearch.cluster.block.ClusterBlockException)27 HashMap (java.util.HashMap)7 ClusterBlock (org.opensearch.cluster.block.ClusterBlock)7 Settings (org.opensearch.common.settings.Settings)7 List (java.util.List)6 PlainActionFuture (org.opensearch.action.support.PlainActionFuture)6 ClusterState (org.opensearch.cluster.ClusterState)6 ArrayList (java.util.ArrayList)5 CountDownLatch (java.util.concurrent.CountDownLatch)5 Matchers.containsString (org.hamcrest.Matchers.containsString)5 CreateIndexResponse (org.opensearch.action.admin.indices.create.CreateIndexResponse)5 Arrays (java.util.Arrays)4 Collections.emptySet (java.util.Collections.emptySet)4 HashSet (java.util.HashSet)4 Locale (java.util.Locale)4 Consumer (java.util.function.Consumer)4 Collectors.toList (java.util.stream.Collectors.toList)4 IntStream (java.util.stream.IntStream)4 Matchers.equalTo (org.hamcrest.Matchers.equalTo)4 Matchers.hasSize (org.hamcrest.Matchers.hasSize)4