Search in sources :

Example 71 with PlainActionFuture

use of org.elasticsearch.action.support.PlainActionFuture in project crate by crate.

the class BlobRecoveryHandler method sendStartRecoveryRequest.

private void sendStartRecoveryRequest() {
    var listener = new PlainActionFuture<TransportResponse>();
    transportService.sendRequest(request.targetNode(), BlobRecoveryTarget.Actions.START_RECOVERY, new BlobStartRecoveryRequest(request.recoveryId(), request.shardId()), TransportRequestOptions.EMPTY, new ActionListenerResponseHandler<>(listener, in -> TransportResponse.Empty.INSTANCE));
    listener.actionGet();
}
Also used : ElasticsearchException(org.elasticsearch.ElasticsearchException) CancellableThreads(org.elasticsearch.common.util.CancellableThreads) StartRecoveryRequest(org.elasticsearch.indices.recovery.StartRecoveryRequest) BlobIndex(io.crate.blob.v2.BlobIndex) BlobRecoveryTarget(org.elasticsearch.indices.recovery.BlobRecoveryTarget) IndexShardClosedException(org.elasticsearch.index.shard.IndexShardClosedException) BlobShard(io.crate.blob.v2.BlobShard) BlobRecoveryDeleteRequest(org.elasticsearch.indices.recovery.BlobRecoveryDeleteRequest) AtomicReference(java.util.concurrent.atomic.AtomicReference) RecoveryTargetHandler(org.elasticsearch.indices.recovery.RecoveryTargetHandler) BytesArray(org.elasticsearch.common.bytes.BytesArray) RecoverySourceHandler(org.elasticsearch.indices.recovery.RecoverySourceHandler) HashSet(java.util.HashSet) BlobRecoveryStartTransferRequest(org.elasticsearch.indices.recovery.BlobRecoveryStartTransferRequest) ActionListenerResponseHandler(org.elasticsearch.action.ActionListenerResponseHandler) BlobStartPrefixResponse(org.elasticsearch.indices.recovery.BlobStartPrefixResponse) BlobStartPrefixSyncRequest(org.elasticsearch.indices.recovery.BlobStartPrefixSyncRequest) TransportResponse(org.elasticsearch.transport.TransportResponse) TransportService(org.elasticsearch.transport.TransportService) BlobContainer(io.crate.blob.BlobContainer) IndexShardState(org.elasticsearch.index.shard.IndexShardState) BlobRecoveryChunkRequest(org.elasticsearch.indices.recovery.BlobRecoveryChunkRequest) BlobStartRecoveryRequest(org.elasticsearch.indices.recovery.BlobStartRecoveryRequest) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) IndexShard(org.elasticsearch.index.shard.IndexShard) Set(java.util.Set) IOException(java.io.IOException) BlobIndicesService(io.crate.blob.v2.BlobIndicesService) StopWatch(org.elasticsearch.common.StopWatch) FileInputStream(java.io.FileInputStream) BytesReference(org.elasticsearch.common.bytes.BytesReference) Hex(io.crate.common.Hex) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) BlobTransferTarget(io.crate.blob.BlobTransferTarget) CountDownLatch(java.util.concurrent.CountDownLatch) Logger(org.apache.logging.log4j.Logger) BlobFinalizeRecoveryRequest(org.elasticsearch.indices.recovery.BlobFinalizeRecoveryRequest) TransportRequestOptions(org.elasticsearch.transport.TransportRequestOptions) LogManager(org.apache.logging.log4j.LogManager) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) BlobStartRecoveryRequest(org.elasticsearch.indices.recovery.BlobStartRecoveryRequest)

Example 72 with PlainActionFuture

use of org.elasticsearch.action.support.PlainActionFuture in project crate by crate.

the class BlobRecoveryHandler method sendFinalizeRecoveryRequest.

private void sendFinalizeRecoveryRequest() {
    var listener = new PlainActionFuture<TransportResponse>();
    transportService.sendRequest(request.targetNode(), BlobRecoveryTarget.Actions.FINALIZE_RECOVERY, new BlobFinalizeRecoveryRequest(request.recoveryId()), TransportRequestOptions.EMPTY, new ActionListenerResponseHandler<>(listener, in -> TransportResponse.Empty.INSTANCE));
    listener.actionGet();
}
Also used : ElasticsearchException(org.elasticsearch.ElasticsearchException) CancellableThreads(org.elasticsearch.common.util.CancellableThreads) StartRecoveryRequest(org.elasticsearch.indices.recovery.StartRecoveryRequest) BlobIndex(io.crate.blob.v2.BlobIndex) BlobRecoveryTarget(org.elasticsearch.indices.recovery.BlobRecoveryTarget) IndexShardClosedException(org.elasticsearch.index.shard.IndexShardClosedException) BlobShard(io.crate.blob.v2.BlobShard) BlobRecoveryDeleteRequest(org.elasticsearch.indices.recovery.BlobRecoveryDeleteRequest) AtomicReference(java.util.concurrent.atomic.AtomicReference) RecoveryTargetHandler(org.elasticsearch.indices.recovery.RecoveryTargetHandler) BytesArray(org.elasticsearch.common.bytes.BytesArray) RecoverySourceHandler(org.elasticsearch.indices.recovery.RecoverySourceHandler) HashSet(java.util.HashSet) BlobRecoveryStartTransferRequest(org.elasticsearch.indices.recovery.BlobRecoveryStartTransferRequest) ActionListenerResponseHandler(org.elasticsearch.action.ActionListenerResponseHandler) BlobStartPrefixResponse(org.elasticsearch.indices.recovery.BlobStartPrefixResponse) BlobStartPrefixSyncRequest(org.elasticsearch.indices.recovery.BlobStartPrefixSyncRequest) TransportResponse(org.elasticsearch.transport.TransportResponse) TransportService(org.elasticsearch.transport.TransportService) BlobContainer(io.crate.blob.BlobContainer) IndexShardState(org.elasticsearch.index.shard.IndexShardState) BlobRecoveryChunkRequest(org.elasticsearch.indices.recovery.BlobRecoveryChunkRequest) BlobStartRecoveryRequest(org.elasticsearch.indices.recovery.BlobStartRecoveryRequest) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) IndexShard(org.elasticsearch.index.shard.IndexShard) Set(java.util.Set) IOException(java.io.IOException) BlobIndicesService(io.crate.blob.v2.BlobIndicesService) StopWatch(org.elasticsearch.common.StopWatch) FileInputStream(java.io.FileInputStream) BytesReference(org.elasticsearch.common.bytes.BytesReference) Hex(io.crate.common.Hex) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) BlobTransferTarget(io.crate.blob.BlobTransferTarget) CountDownLatch(java.util.concurrent.CountDownLatch) Logger(org.apache.logging.log4j.Logger) BlobFinalizeRecoveryRequest(org.elasticsearch.indices.recovery.BlobFinalizeRecoveryRequest) TransportRequestOptions(org.elasticsearch.transport.TransportRequestOptions) LogManager(org.apache.logging.log4j.LogManager) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) BlobFinalizeRecoveryRequest(org.elasticsearch.indices.recovery.BlobFinalizeRecoveryRequest)

Example 73 with PlainActionFuture

use of org.elasticsearch.action.support.PlainActionFuture in project crate by crate.

the class TransportVerifyShardBeforeCloseActionTests method testUnavailableShardsMarkedAsStale.

@Test
public void testUnavailableShardsMarkedAsStale() throws Exception {
    String index = "test";
    ShardId shardId = new ShardId(index, "_na_", 0);
    int nbReplicas = randomIntBetween(1, 10);
    ShardRoutingState[] replicaStates = new ShardRoutingState[nbReplicas];
    Arrays.fill(replicaStates, ShardRoutingState.STARTED);
    final ClusterState clusterState = state(index, true, ShardRoutingState.STARTED, replicaStates);
    setState(clusterService, clusterState);
    IndexShardRoutingTable shardRoutingTable = clusterState.routingTable().index(index).shard(shardId.id());
    IndexMetadata indexMetaData = clusterState.getMetadata().index(index);
    ShardRouting primaryRouting = shardRoutingTable.primaryShard();
    long primaryTerm = indexMetaData.primaryTerm(0);
    Set<String> inSyncAllocationIds = indexMetaData.inSyncAllocationIds(0);
    Set<String> trackedShards = shardRoutingTable.getAllAllocationIds();
    List<ShardRouting> unavailableShards = randomSubsetOf(randomIntBetween(1, nbReplicas), shardRoutingTable.replicaShards());
    IndexShardRoutingTable.Builder shardRoutingTableBuilder = new IndexShardRoutingTable.Builder(shardRoutingTable);
    unavailableShards.forEach(shardRoutingTableBuilder::removeShard);
    shardRoutingTable = shardRoutingTableBuilder.build();
    ReplicationGroup replicationGroup = new ReplicationGroup(shardRoutingTable, inSyncAllocationIds, trackedShards);
    assertThat(replicationGroup.getUnavailableInSyncShards().size(), greaterThan(0));
    PlainActionFuture<PrimaryResult> listener = new PlainActionFuture<>();
    TransportVerifyShardBeforeCloseAction.ShardRequest request = new TransportVerifyShardBeforeCloseAction.ShardRequest(shardId, false, clusterBlock);
    ReplicationOperation.Replicas<TransportVerifyShardBeforeCloseAction.ShardRequest> proxy = action.newReplicasProxy();
    ReplicationOperation<TransportVerifyShardBeforeCloseAction.ShardRequest, TransportVerifyShardBeforeCloseAction.ShardRequest, PrimaryResult> operation = new ReplicationOperation<>(request, createPrimary(primaryRouting, replicationGroup), listener, proxy, logger, "test", primaryTerm);
    operation.execute();
    CapturingTransport.CapturedRequest[] capturedRequests = transport.getCapturedRequestsAndClear();
    assertThat(capturedRequests.length, equalTo(nbReplicas));
    for (CapturingTransport.CapturedRequest capturedRequest : capturedRequests) {
        String actionName = capturedRequest.action;
        if (actionName.startsWith(ShardStateAction.SHARD_FAILED_ACTION_NAME)) {
            assertThat(capturedRequest.request, instanceOf(ShardStateAction.FailedShardEntry.class));
            String allocationId = ((ShardStateAction.FailedShardEntry) capturedRequest.request).getAllocationId();
            assertTrue(unavailableShards.stream().anyMatch(shardRouting -> shardRouting.allocationId().getId().equals(allocationId)));
            transport.handleResponse(capturedRequest.requestId, TransportResponse.Empty.INSTANCE);
        } else if (actionName.startsWith(TransportVerifyShardBeforeCloseAction.NAME)) {
            assertThat(capturedRequest.request, instanceOf(ConcreteShardRequest.class));
            String allocationId = ((ConcreteShardRequest) capturedRequest.request).getTargetAllocationID();
            assertFalse(unavailableShards.stream().anyMatch(shardRouting -> shardRouting.allocationId().getId().equals(allocationId)));
            assertTrue(inSyncAllocationIds.stream().anyMatch(inSyncAllocationId -> inSyncAllocationId.equals(allocationId)));
            transport.handleResponse(capturedRequest.requestId, new TransportReplicationAction.ReplicaResponse(0L, 0L));
        } else {
            fail("Test does not support action " + capturedRequest.action);
        }
    }
    ReplicationResponse.ShardInfo shardInfo = listener.get().getShardInfo();
    assertThat(shardInfo.getFailed(), equalTo(0));
    assertThat(shardInfo.getFailures(), arrayWithSize(0));
    assertThat(shardInfo.getSuccessful(), equalTo(1 + nbReplicas - unavailableShards.size()));
}
Also used : ShardId(org.elasticsearch.index.shard.ShardId) Arrays(java.util.Arrays) ClusterServiceUtils.createClusterService(org.elasticsearch.test.ClusterServiceUtils.createClusterService) IndexMetadata(org.elasticsearch.cluster.metadata.IndexMetadata) ClusterBlocks(org.elasticsearch.cluster.block.ClusterBlocks) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) Mockito.doThrow(org.mockito.Mockito.doThrow) ClusterState(org.elasticsearch.cluster.ClusterState) Settings(org.elasticsearch.common.settings.Settings) ClusterBlock(org.elasticsearch.cluster.block.ClusterBlock) After(org.junit.After) ThreadPool(org.elasticsearch.threadpool.ThreadPool) ClusterName(org.elasticsearch.cluster.ClusterName) EnumSet(java.util.EnumSet) AfterClass(org.junit.AfterClass) ConcreteShardRequest(org.elasticsearch.action.support.replication.TransportReplicationAction.ConcreteShardRequest) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) UUIDs(org.elasticsearch.common.UUIDs) Set(java.util.Set) IndexShardRoutingTable(org.elasticsearch.cluster.routing.IndexShardRoutingTable) TransportReplicationAction(org.elasticsearch.action.support.replication.TransportReplicationAction) Engine(org.elasticsearch.index.engine.Engine) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) Matchers.any(org.mockito.Matchers.any) List(java.util.List) ShardStateAction(org.elasticsearch.cluster.action.shard.ShardStateAction) RestStatus(org.elasticsearch.rest.RestStatus) Matchers.equalTo(org.hamcrest.Matchers.equalTo) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Matchers.is(org.hamcrest.Matchers.is) Mockito.mock(org.mockito.Mockito.mock) ShardRouting(org.elasticsearch.cluster.routing.ShardRouting) ClusterStateCreationUtils.state(org.elasticsearch.action.support.replication.ClusterStateCreationUtils.state) Matchers.arrayWithSize(org.hamcrest.Matchers.arrayWithSize) BeforeClass(org.junit.BeforeClass) ClusterService(org.elasticsearch.cluster.service.ClusterService) ShardRoutingState(org.elasticsearch.cluster.routing.ShardRoutingState) ArgumentCaptor(org.mockito.ArgumentCaptor) TransportResponse(org.elasticsearch.transport.TransportResponse) IndicesService(org.elasticsearch.indices.IndicesService) ESTestCase(org.elasticsearch.test.ESTestCase) TransportService(org.elasticsearch.transport.TransportService) INDEX_CLOSED_BLOCK_ID(io.crate.execution.ddl.tables.TransportCloseTable.INDEX_CLOSED_BLOCK_ID) ClusterBlockLevel(org.elasticsearch.cluster.block.ClusterBlockLevel) Before(org.junit.Before) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) SetOnce(org.apache.lucene.util.SetOnce) IndexShard(org.elasticsearch.index.shard.IndexShard) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) Mockito.verify(org.mockito.Mockito.verify) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) FlushRequest(org.elasticsearch.action.admin.indices.flush.FlushRequest) ReplicationResponse(org.elasticsearch.action.support.replication.ReplicationResponse) ReplicationOperation(org.elasticsearch.action.support.replication.ReplicationOperation) ReplicationGroup(org.elasticsearch.index.shard.ReplicationGroup) ClusterServiceUtils.setState(org.elasticsearch.test.ClusterServiceUtils.setState) ActionListener(org.elasticsearch.action.ActionListener) IndexShardRoutingTable(org.elasticsearch.cluster.routing.IndexShardRoutingTable) ReplicationGroup(org.elasticsearch.index.shard.ReplicationGroup) ReplicationResponse(org.elasticsearch.action.support.replication.ReplicationResponse) ShardId(org.elasticsearch.index.shard.ShardId) IndexMetadata(org.elasticsearch.cluster.metadata.IndexMetadata) ReplicationOperation(org.elasticsearch.action.support.replication.ReplicationOperation) ClusterState(org.elasticsearch.cluster.ClusterState) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) ShardRoutingState(org.elasticsearch.cluster.routing.ShardRoutingState) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) ConcreteShardRequest(org.elasticsearch.action.support.replication.TransportReplicationAction.ConcreteShardRequest) ShardRouting(org.elasticsearch.cluster.routing.ShardRouting) Test(org.junit.Test)

Example 74 with PlainActionFuture

use of org.elasticsearch.action.support.PlainActionFuture in project crate by crate.

the class NodeConnectionsServiceTests method testConnectAndDisconnect.

public void testConnectAndDisconnect() throws Exception {
    final NodeConnectionsService service = new NodeConnectionsService(Settings.EMPTY, threadPool, transportService);
    final AtomicBoolean stopReconnecting = new AtomicBoolean();
    final Thread reconnectionThread = new Thread(() -> {
        while (stopReconnecting.get() == false) {
            final PlainActionFuture<Void> future = new PlainActionFuture<>();
            service.ensureConnections(() -> future.onResponse(null));
            future.actionGet();
        }
    }, "reconnection thread");
    reconnectionThread.start();
    try {
        final List<DiscoveryNode> allNodes = generateNodes();
        for (int iteration = 0; iteration < 3; iteration++) {
            final boolean isDisrupting = randomBoolean();
            if (isDisrupting == false) {
                // if the previous iteration was a disrupting one then there could still be some pending disconnections which would
                // prevent us from asserting that all nodes are connected in this iteration without this call.
                ensureConnections(service);
            }
            final AtomicBoolean stopDisrupting = new AtomicBoolean();
            final Thread disruptionThread = new Thread(() -> {
                while (isDisrupting && stopDisrupting.get() == false) {
                    transportService.disconnectFromNode(randomFrom(allNodes));
                }
            }, "disruption thread " + iteration);
            disruptionThread.start();
            final DiscoveryNodes nodes = discoveryNodesFromList(randomSubsetOf(allNodes));
            final PlainActionFuture<Void> future = new PlainActionFuture<>();
            service.connectToNodes(nodes, () -> future.onResponse(null));
            future.actionGet();
            if (isDisrupting == false) {
                assertConnected(transportService, nodes);
            }
            service.disconnectFromNodesExcept(nodes);
            assertTrue(stopDisrupting.compareAndSet(false, true));
            disruptionThread.join();
            if (randomBoolean()) {
                // sometimes do not wait for the disconnections to complete before starting the next connections
                if (usually()) {
                    ensureConnections(service);
                    assertConnectedExactlyToNodes(nodes);
                } else {
                    assertBusy(() -> assertConnectedExactlyToNodes(nodes));
                }
            }
        }
    } finally {
        assertTrue(stopReconnecting.compareAndSet(false, true));
        reconnectionThread.join();
    }
    ensureConnections(service);
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes)

Example 75 with PlainActionFuture

use of org.elasticsearch.action.support.PlainActionFuture in project crate by crate.

the class NodeConnectionsServiceTests method testOnlyBlocksOnConnectionsToNewNodes.

public void testOnlyBlocksOnConnectionsToNewNodes() throws Exception {
    final NodeConnectionsService service = new NodeConnectionsService(Settings.EMPTY, threadPool, transportService);
    // connect to one node
    final DiscoveryNode node0 = new DiscoveryNode("node0", buildNewFakeTransportAddress(), Version.CURRENT);
    final DiscoveryNodes nodes0 = DiscoveryNodes.builder().add(node0).build();
    final PlainActionFuture<Void> future0 = new PlainActionFuture<>();
    service.connectToNodes(nodes0, () -> future0.onResponse(null));
    future0.actionGet();
    assertConnectedExactlyToNodes(nodes0);
    // connection attempts to node0 block indefinitely
    final CyclicBarrier connectionBarrier = new CyclicBarrier(2);
    try {
        nodeConnectionBlocks.put(node0, connectionBarrier::await);
        transportService.disconnectFromNode(node0);
        // can still connect to another node without blocking
        final DiscoveryNode node1 = new DiscoveryNode("node1", buildNewFakeTransportAddress(), Version.CURRENT);
        final DiscoveryNodes nodes1 = DiscoveryNodes.builder().add(node1).build();
        final DiscoveryNodes nodes01 = DiscoveryNodes.builder(nodes0).add(node1).build();
        final PlainActionFuture<Void> future1 = new PlainActionFuture<>();
        service.connectToNodes(nodes01, () -> future1.onResponse(null));
        future1.actionGet();
        assertConnectedExactlyToNodes(nodes1);
        // can also disconnect from node0 without blocking
        final PlainActionFuture<Void> future2 = new PlainActionFuture<>();
        service.connectToNodes(nodes1, () -> future2.onResponse(null));
        future2.actionGet();
        service.disconnectFromNodesExcept(nodes1);
        assertConnectedExactlyToNodes(nodes1);
        // however, now node0 is considered to be a new node so we will block on a subsequent attempt to connect to it
        final PlainActionFuture<Void> future3 = new PlainActionFuture<>();
        service.connectToNodes(nodes01, () -> future3.onResponse(null));
        expectThrows(ElasticsearchTimeoutException.class, () -> future3.actionGet(timeValueMillis(scaledRandomIntBetween(1, 1000))));
        // once the connection is unblocked we successfully connect to it.
        connectionBarrier.await(10, TimeUnit.SECONDS);
        nodeConnectionBlocks.clear();
        future3.actionGet();
        assertConnectedExactlyToNodes(nodes01);
        // if we disconnect from a node while blocked trying to connect to it then we do eventually disconnect from it
        nodeConnectionBlocks.put(node0, connectionBarrier::await);
        transportService.disconnectFromNode(node0);
        final PlainActionFuture<Void> future4 = new PlainActionFuture<>();
        service.connectToNodes(nodes01, () -> future4.onResponse(null));
        future4.actionGet();
        assertConnectedExactlyToNodes(nodes1);
        service.disconnectFromNodesExcept(nodes1);
        connectionBarrier.await();
        if (randomBoolean()) {
            // assertBusy because the connection completes before disconnecting, so we might briefly observe a connection to node0
            assertBusy(() -> assertConnectedExactlyToNodes(nodes1));
        }
        // use ensureConnections() to wait until the service is idle
        ensureConnections(service);
        assertConnectedExactlyToNodes(nodes1);
        // if we disconnect from a node while blocked trying to connect to it then the listener is notified
        final PlainActionFuture<Void> future6 = new PlainActionFuture<>();
        service.connectToNodes(nodes01, () -> future6.onResponse(null));
        expectThrows(ElasticsearchTimeoutException.class, () -> future6.actionGet(timeValueMillis(scaledRandomIntBetween(1, 1000))));
        service.disconnectFromNodesExcept(nodes1);
        // completed even though the connection attempt is still blocked
        future6.actionGet();
        assertConnectedExactlyToNodes(nodes1);
        connectionBarrier.await(10, TimeUnit.SECONDS);
        nodeConnectionBlocks.clear();
        ensureConnections(service);
        assertConnectedExactlyToNodes(nodes1);
    } finally {
        nodeConnectionBlocks.clear();
        connectionBarrier.reset();
    }
}
Also used : DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) CyclicBarrier(java.util.concurrent.CyclicBarrier)

Aggregations

PlainActionFuture (org.elasticsearch.action.support.PlainActionFuture)82 ShardId (org.elasticsearch.index.shard.ShardId)37 ClusterState (org.elasticsearch.cluster.ClusterState)28 ExecutionException (java.util.concurrent.ExecutionException)27 ShardRouting (org.elasticsearch.cluster.routing.ShardRouting)25 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)21 IOException (java.io.IOException)20 ArrayList (java.util.ArrayList)20 Test (org.junit.Test)20 IndexShardRoutingTable (org.elasticsearch.cluster.routing.IndexShardRoutingTable)18 ElasticsearchException (org.elasticsearch.ElasticsearchException)17 TransportRequest (org.elasticsearch.transport.TransportRequest)17 Matchers.anyString (org.mockito.Matchers.anyString)17 HashSet (java.util.HashSet)16 List (java.util.List)16 CloseIndexRequest (org.elasticsearch.action.admin.indices.close.CloseIndexRequest)16 IndexShard (org.elasticsearch.index.shard.IndexShard)16 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)16 DiscoveryNode (org.elasticsearch.cluster.node.DiscoveryNode)15 ClusterBlockException (org.elasticsearch.cluster.block.ClusterBlockException)13