Search in sources :

Example 36 with TransportService

use of org.elasticsearch.transport.TransportService in project elasticsearch by elastic.

the class IndicesStoreIntegrationIT method testShardCleanupIfShardDeletionAfterRelocationFailedAndIndexDeleted.

/* Test that shard is deleted in case ShardActiveRequest after relocation and next incoming cluster state is an index delete. */
public void testShardCleanupIfShardDeletionAfterRelocationFailedAndIndexDeleted() throws Exception {
    final String node_1 = internalCluster().startNode();
    logger.info("--> creating index [test] with one shard and on replica");
    assertAcked(prepareCreate("test").setSettings(Settings.builder().put(indexSettings()).put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)));
    ensureGreen("test");
    ClusterState state = client().admin().cluster().prepareState().get().getState();
    Index index = state.metaData().index("test").getIndex();
    assertThat(Files.exists(shardDirectory(node_1, index, 0)), equalTo(true));
    assertThat(Files.exists(indexDirectory(node_1, index)), equalTo(true));
    final String node_2 = internalCluster().startDataOnlyNode(Settings.builder().build());
    assertFalse(client().admin().cluster().prepareHealth().setWaitForNodes("2").get().isTimedOut());
    assertThat(Files.exists(shardDirectory(node_1, index, 0)), equalTo(true));
    assertThat(Files.exists(indexDirectory(node_1, index)), equalTo(true));
    assertThat(Files.exists(shardDirectory(node_2, index, 0)), equalTo(false));
    assertThat(Files.exists(indexDirectory(node_2, index)), equalTo(false));
    // add a transport delegate that will prevent the shard active request to succeed the first time after relocation has finished.
    // node_1 will then wait for the next cluster state change before it tries a next attempt to delete the shard.
    MockTransportService transportServiceNode_1 = (MockTransportService) internalCluster().getInstance(TransportService.class, node_1);
    TransportService transportServiceNode_2 = internalCluster().getInstance(TransportService.class, node_2);
    final CountDownLatch shardActiveRequestSent = new CountDownLatch(1);
    transportServiceNode_1.addDelegate(transportServiceNode_2, new MockTransportService.DelegateTransport(transportServiceNode_1.original()) {

        @Override
        protected void sendRequest(Connection connection, long requestId, String action, TransportRequest request, TransportRequestOptions options) throws IOException {
            if (action.equals("internal:index/shard/exists") && shardActiveRequestSent.getCount() > 0) {
                shardActiveRequestSent.countDown();
                logger.info("prevent shard active request from being sent");
                throw new ConnectTransportException(connection.getNode(), "DISCONNECT: simulated");
            }
            super.sendRequest(connection, requestId, action, request, options);
        }
    });
    logger.info("--> move shard from {} to {}, and wait for relocation to finish", node_1, node_2);
    internalCluster().client().admin().cluster().prepareReroute().add(new MoveAllocationCommand("test", 0, node_1, node_2)).get();
    shardActiveRequestSent.await();
    ClusterHealthResponse clusterHealth = client().admin().cluster().prepareHealth().setWaitForNoRelocatingShards(true).get();
    assertThat(clusterHealth.isTimedOut(), equalTo(false));
    logClusterState();
    // delete the index. node_1 that still waits for the next cluster state update will then get the delete index next.
    // it must still delete the shard, even if it cannot find it anymore in indicesservice
    client().admin().indices().prepareDelete("test").get();
    assertThat(waitForShardDeletion(node_1, index, 0), equalTo(false));
    assertThat(waitForIndexDeletion(node_1, index), equalTo(false));
    assertThat(Files.exists(shardDirectory(node_1, index, 0)), equalTo(false));
    assertThat(Files.exists(indexDirectory(node_1, index)), equalTo(false));
    assertThat(waitForShardDeletion(node_2, index, 0), equalTo(false));
    assertThat(waitForIndexDeletion(node_2, index), equalTo(false));
    assertThat(Files.exists(shardDirectory(node_2, index, 0)), equalTo(false));
    assertThat(Files.exists(indexDirectory(node_2, index)), equalTo(false));
}
Also used : ClusterState(org.elasticsearch.cluster.ClusterState) TransportRequest(org.elasticsearch.transport.TransportRequest) MockTransportService(org.elasticsearch.test.transport.MockTransportService) ClusterHealthResponse(org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse) MoveAllocationCommand(org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand) Index(org.elasticsearch.index.Index) IOException(java.io.IOException) CountDownLatch(java.util.concurrent.CountDownLatch) MockTransportService(org.elasticsearch.test.transport.MockTransportService) TransportService(org.elasticsearch.transport.TransportService) ConnectTransportException(org.elasticsearch.transport.ConnectTransportException) TransportRequestOptions(org.elasticsearch.transport.TransportRequestOptions)

Example 37 with TransportService

use of org.elasticsearch.transport.TransportService in project elasticsearch by elastic.

the class TransportInstanceSingleOperationActionTests method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    transport = new CapturingTransport();
    clusterService = createClusterService(THREAD_POOL);
    transportService = new TransportService(clusterService.getSettings(), transport, THREAD_POOL, TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> clusterService.localNode(), null);
    transportService.start();
    transportService.acceptIncomingRequests();
    action = new TestTransportInstanceSingleOperationAction(Settings.EMPTY, "indices:admin/test", transportService, new ActionFilters(new HashSet<ActionFilter>()), new MyResolver(), Request::new);
}
Also used : ShardId(org.elasticsearch.index.shard.ShardId) BeforeClass(org.junit.BeforeClass) ShardIterator(org.elasticsearch.cluster.routing.ShardIterator) ClusterServiceUtils.createClusterService(org.elasticsearch.test.ClusterServiceUtils.createClusterService) ClusterService(org.elasticsearch.cluster.service.ClusterService) IsEqual.equalTo(org.hamcrest.core.IsEqual.equalTo) IndicesRequest(org.elasticsearch.action.IndicesRequest) TimeoutException(java.util.concurrent.TimeoutException) HashMap(java.util.HashMap) ClusterBlocks(org.elasticsearch.cluster.block.ClusterBlocks) ShardRoutingState(org.elasticsearch.cluster.routing.ShardRoutingState) Supplier(java.util.function.Supplier) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) HashSet(java.util.HashSet) ClusterState(org.elasticsearch.cluster.ClusterState) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) ConnectTransportException(org.elasticsearch.transport.ConnectTransportException) Settings(org.elasticsearch.common.settings.Settings) ClusterBlock(org.elasticsearch.cluster.block.ClusterBlock) ClusterBlockException(org.elasticsearch.cluster.block.ClusterBlockException) TimeValue(org.elasticsearch.common.unit.TimeValue) After(org.junit.After) Map(java.util.Map) ThreadPool(org.elasticsearch.threadpool.ThreadPool) ESTestCase(org.elasticsearch.test.ESTestCase) TransportService(org.elasticsearch.transport.TransportService) ClusterBlockLevel(org.elasticsearch.cluster.block.ClusterBlockLevel) ClusterStateCreationUtils(org.elasticsearch.action.support.replication.ClusterStateCreationUtils) Before(org.junit.Before) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) AfterClass(org.junit.AfterClass) ActionFilter(org.elasticsearch.action.support.ActionFilter) ActionFilters(org.elasticsearch.action.support.ActionFilters) ActionResponse(org.elasticsearch.action.ActionResponse) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) ExceptionsHelper(org.elasticsearch.ExceptionsHelper) RestStatus(org.elasticsearch.rest.RestStatus) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) TransportException(org.elasticsearch.transport.TransportException) ClusterServiceUtils.setState(org.elasticsearch.test.ClusterServiceUtils.setState) ActionListener(org.elasticsearch.action.ActionListener) TransportService(org.elasticsearch.transport.TransportService) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) ActionFilters(org.elasticsearch.action.support.ActionFilters) ActionFilter(org.elasticsearch.action.support.ActionFilter) Before(org.junit.Before)

Example 38 with TransportService

use of org.elasticsearch.transport.TransportService in project elasticsearch by elastic.

the class InternalTestCluster method reset.

private synchronized void reset(boolean wipeData) throws IOException {
    // clear all rules for mock transport services
    for (NodeAndClient nodeAndClient : nodes.values()) {
        TransportService transportService = nodeAndClient.node.injector().getInstance(TransportService.class);
        if (transportService instanceof MockTransportService) {
            final MockTransportService mockTransportService = (MockTransportService) transportService;
            mockTransportService.clearAllRules();
            mockTransportService.clearTracers();
        }
    }
    randomlyResetClients();
    final int newSize = sharedNodesSeeds.length;
    if (nextNodeId.get() == newSize && nodes.size() == newSize) {
        if (wipeData) {
            wipePendingDataDirectories();
        }
        if (nodes.size() > 0 && autoManageMinMasterNodes) {
            updateMinMasterNodes(getMasterNodesCount());
        }
        logger.debug("Cluster hasn't changed - moving out - nodes: [{}] nextNodeId: [{}] numSharedNodes: [{}]", nodes.keySet(), nextNodeId.get(), newSize);
        return;
    }
    logger.debug("Cluster is NOT consistent - restarting shared nodes - nodes: [{}] nextNodeId: [{}] numSharedNodes: [{}]", nodes.keySet(), nextNodeId.get(), newSize);
    // trash all nodes with id >= sharedNodesSeeds.length - they are non shared
    final List<NodeAndClient> toClose = new ArrayList<>();
    for (Iterator<NodeAndClient> iterator = nodes.values().iterator(); iterator.hasNext(); ) {
        NodeAndClient nodeAndClient = iterator.next();
        if (nodeAndClient.nodeAndClientId() >= sharedNodesSeeds.length) {
            logger.debug("Close Node [{}] not shared", nodeAndClient.name);
            toClose.add(nodeAndClient);
        }
    }
    stopNodesAndClients(toClose);
    // clean up what the nodes left that is unused
    if (wipeData) {
        wipePendingDataDirectories();
    }
    // start any missing node
    assert newSize == numSharedDedicatedMasterNodes + numSharedDataNodes + numSharedCoordOnlyNodes;
    final int numberOfMasterNodes = numSharedDedicatedMasterNodes > 0 ? numSharedDedicatedMasterNodes : numSharedDataNodes;
    final int defaultMinMasterNodes = (numberOfMasterNodes / 2) + 1;
    // we want to start nodes in one go due to min master nodes
    final List<NodeAndClient> toStartAndPublish = new ArrayList<>();
    for (int i = 0; i < numSharedDedicatedMasterNodes; i++) {
        final Settings.Builder settings = Settings.builder();
        settings.put(Node.NODE_MASTER_SETTING.getKey(), true);
        settings.put(Node.NODE_DATA_SETTING.getKey(), false);
        NodeAndClient nodeAndClient = buildNode(i, sharedNodesSeeds[i], settings.build(), true, defaultMinMasterNodes);
        toStartAndPublish.add(nodeAndClient);
    }
    for (int i = numSharedDedicatedMasterNodes; i < numSharedDedicatedMasterNodes + numSharedDataNodes; i++) {
        final Settings.Builder settings = Settings.builder();
        if (numSharedDedicatedMasterNodes > 0) {
            // if we don't have dedicated master nodes, keep things default
            settings.put(Node.NODE_MASTER_SETTING.getKey(), false).build();
            settings.put(Node.NODE_DATA_SETTING.getKey(), true).build();
        }
        NodeAndClient nodeAndClient = buildNode(i, sharedNodesSeeds[i], settings.build(), true, defaultMinMasterNodes);
        toStartAndPublish.add(nodeAndClient);
    }
    for (int i = numSharedDedicatedMasterNodes + numSharedDataNodes; i < numSharedDedicatedMasterNodes + numSharedDataNodes + numSharedCoordOnlyNodes; i++) {
        final Builder settings = Settings.builder().put(Node.NODE_MASTER_SETTING.getKey(), false).put(Node.NODE_DATA_SETTING.getKey(), false).put(Node.NODE_INGEST_SETTING.getKey(), false);
        NodeAndClient nodeAndClient = buildNode(i, sharedNodesSeeds[i], settings.build(), true, defaultMinMasterNodes);
        toStartAndPublish.add(nodeAndClient);
    }
    startAndPublishNodesAndClients(toStartAndPublish);
    nextNodeId.set(newSize);
    assert size() == newSize;
    if (newSize > 0) {
        validateClusterFormed();
    }
    logger.debug("Cluster is consistent again - nodes: [{}] nextNodeId: [{}] numSharedNodes: [{}]", nodes.keySet(), nextNodeId.get(), newSize);
}
Also used : MockTransportService(org.elasticsearch.test.transport.MockTransportService) TransportService(org.elasticsearch.transport.TransportService) MockTransportService(org.elasticsearch.test.transport.MockTransportService) XContentBuilder(org.elasticsearch.common.xcontent.XContentBuilder) Builder(org.elasticsearch.common.settings.Settings.Builder) ArrayList(java.util.ArrayList) Builder(org.elasticsearch.common.settings.Settings.Builder) RecoverySettings(org.elasticsearch.indices.recovery.RecoverySettings) TransportSettings(org.elasticsearch.transport.TransportSettings) DiskThresholdSettings(org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings) Settings(org.elasticsearch.common.settings.Settings)

Example 39 with TransportService

use of org.elasticsearch.transport.TransportService in project elasticsearch by elastic.

the class ClusterStateHealthTests method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    clusterService = createClusterService(threadPool);
    transportService = new TransportService(clusterService.getSettings(), new CapturingTransport(), threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> clusterService.localNode(), null);
    transportService.start();
    transportService.acceptIncomingRequests();
}
Also used : MetaData(org.elasticsearch.cluster.metadata.MetaData) ClusterServiceUtils.createClusterService(org.elasticsearch.test.ClusterServiceUtils.createClusterService) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) ClusterState(org.elasticsearch.cluster.ClusterState) ClusterStateUpdateTask(org.elasticsearch.cluster.ClusterStateUpdateTask) Settings(org.elasticsearch.common.settings.Settings) After(org.junit.After) IndicesOptions(org.elasticsearch.action.support.IndicesOptions) RoutingTableGenerator(org.elasticsearch.cluster.routing.RoutingTableGenerator) ThreadPool(org.elasticsearch.threadpool.ThreadPool) ClusterName(org.elasticsearch.cluster.ClusterName) AfterClass(org.junit.AfterClass) ActionFilters(org.elasticsearch.action.support.ActionFilters) Matchers.lessThanOrEqualTo(org.hamcrest.Matchers.lessThanOrEqualTo) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) UUIDs(org.elasticsearch.common.UUIDs) Set(java.util.Set) IndexShardRoutingTable(org.elasticsearch.cluster.routing.IndexShardRoutingTable) ObjectCursor(com.carrotsearch.hppc.cursors.ObjectCursor) Sets(org.elasticsearch.common.util.set.Sets) RecoverySource(org.elasticsearch.cluster.routing.RecoverySource) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Version(org.elasticsearch.Version) ClusterHealthRequest(org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest) IndexRoutingTable(org.elasticsearch.cluster.routing.IndexRoutingTable) IndexMetaData(org.elasticsearch.cluster.metadata.IndexMetaData) ImmutableOpenIntMap(org.elasticsearch.common.collect.ImmutableOpenIntMap) Matchers.is(org.hamcrest.Matchers.is) TransportClusterHealthAction(org.elasticsearch.action.admin.cluster.health.TransportClusterHealthAction) IntObjectCursor(com.carrotsearch.hppc.cursors.IntObjectCursor) ShardRouting(org.elasticsearch.cluster.routing.ShardRouting) BeforeClass(org.junit.BeforeClass) CoreMatchers.equalTo(org.hamcrest.CoreMatchers.equalTo) ClusterService(org.elasticsearch.cluster.service.ClusterService) BytesStreamOutput(org.elasticsearch.common.io.stream.BytesStreamOutput) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) CoreMatchers.allOf(org.hamcrest.CoreMatchers.allOf) ESTestCase(org.elasticsearch.test.ESTestCase) TransportService(org.elasticsearch.transport.TransportService) Before(org.junit.Before) DiscoveryNodes(org.elasticsearch.cluster.node.DiscoveryNodes) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) TestGatewayAllocator(org.elasticsearch.test.gateway.TestGatewayAllocator) ClusterHealthResponse(org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse) IOException(java.io.IOException) UnassignedInfo(org.elasticsearch.cluster.routing.UnassignedInfo) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) RoutingTable(org.elasticsearch.cluster.routing.RoutingTable) StreamInput(org.elasticsearch.common.io.stream.StreamInput) LocalClusterUpdateTask(org.elasticsearch.cluster.LocalClusterUpdateTask) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) ClusterServiceUtils.setState(org.elasticsearch.test.ClusterServiceUtils.setState) TransportService(org.elasticsearch.transport.TransportService) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) Before(org.junit.Before)

Example 40 with TransportService

use of org.elasticsearch.transport.TransportService in project elasticsearch by elastic.

the class DynamicMappingDisabledTests method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    Settings settings = Settings.builder().put(MapperService.INDEX_MAPPER_DYNAMIC_SETTING.getKey(), false).build();
    clusterService = createClusterService(threadPool);
    Transport transport = new MockTcpTransport(settings, threadPool, BigArrays.NON_RECYCLING_INSTANCE, new NoneCircuitBreakerService(), new NamedWriteableRegistry(Collections.emptyList()), new NetworkService(settings, Collections.emptyList()));
    transportService = new TransportService(clusterService.getSettings(), transport, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> clusterService.localNode(), null);
    IndicesService indicesService = getInstanceFromNode(IndicesService.class);
    ShardStateAction shardStateAction = new ShardStateAction(settings, clusterService, transportService, null, null, threadPool);
    ActionFilters actionFilters = new ActionFilters(Collections.emptySet());
    IndexNameExpressionResolver indexNameExpressionResolver = new IndexNameExpressionResolver(settings);
    AutoCreateIndex autoCreateIndex = new AutoCreateIndex(settings, new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS), indexNameExpressionResolver);
    UpdateHelper updateHelper = new UpdateHelper(settings, null);
    TransportShardBulkAction shardBulkAction = new TransportShardBulkAction(settings, transportService, clusterService, indicesService, threadPool, shardStateAction, null, updateHelper, actionFilters, indexNameExpressionResolver);
    transportBulkAction = new TransportBulkAction(settings, threadPool, transportService, clusterService, null, shardBulkAction, null, actionFilters, indexNameExpressionResolver, autoCreateIndex, System::currentTimeMillis);
}
Also used : NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) ESSingleNodeTestCase(org.elasticsearch.test.ESSingleNodeTestCase) UpdateHelper(org.elasticsearch.action.update.UpdateHelper) BeforeClass(org.junit.BeforeClass) BigArrays(org.elasticsearch.common.util.BigArrays) ClusterServiceUtils.createClusterService(org.elasticsearch.test.ClusterServiceUtils.createClusterService) TransportBulkAction(org.elasticsearch.action.bulk.TransportBulkAction) ClusterService(org.elasticsearch.cluster.service.ClusterService) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TransportShardBulkAction(org.elasticsearch.action.bulk.TransportShardBulkAction) AutoCreateIndex(org.elasticsearch.action.support.AutoCreateIndex) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) IndexRequest(org.elasticsearch.action.index.IndexRequest) NetworkService(org.elasticsearch.common.network.NetworkService) Settings(org.elasticsearch.common.settings.Settings) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService) NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) IndexNotFoundException(org.elasticsearch.index.IndexNotFoundException) After(org.junit.After) ThreadPool(org.elasticsearch.threadpool.ThreadPool) Requests(org.elasticsearch.client.Requests) IndicesService(org.elasticsearch.indices.IndicesService) TransportService(org.elasticsearch.transport.TransportService) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) AfterClass(org.junit.AfterClass) ActionFilters(org.elasticsearch.action.support.ActionFilters) Transport(org.elasticsearch.transport.Transport) BulkResponse(org.elasticsearch.action.bulk.BulkResponse) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) TimeUnit(java.util.concurrent.TimeUnit) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) ShardStateAction(org.elasticsearch.cluster.action.shard.ShardStateAction) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) BulkRequest(org.elasticsearch.action.bulk.BulkRequest) Collections(java.util.Collections) ActionListener(org.elasticsearch.action.ActionListener) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) TransportBulkAction(org.elasticsearch.action.bulk.TransportBulkAction) IndicesService(org.elasticsearch.indices.IndicesService) ShardStateAction(org.elasticsearch.cluster.action.shard.ShardStateAction) ActionFilters(org.elasticsearch.action.support.ActionFilters) TransportShardBulkAction(org.elasticsearch.action.bulk.TransportShardBulkAction) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) UpdateHelper(org.elasticsearch.action.update.UpdateHelper) TransportService(org.elasticsearch.transport.TransportService) NetworkService(org.elasticsearch.common.network.NetworkService) AutoCreateIndex(org.elasticsearch.action.support.AutoCreateIndex) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) Transport(org.elasticsearch.transport.Transport) MockTcpTransport(org.elasticsearch.transport.MockTcpTransport) Settings(org.elasticsearch.common.settings.Settings) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) NoneCircuitBreakerService(org.elasticsearch.indices.breaker.NoneCircuitBreakerService)

Aggregations

TransportService (org.elasticsearch.transport.TransportService)42 Settings (org.elasticsearch.common.settings.Settings)25 ThreadPool (org.elasticsearch.threadpool.ThreadPool)21 DiscoveryNode (org.elasticsearch.cluster.node.DiscoveryNode)19 ClusterState (org.elasticsearch.cluster.ClusterState)18 ClusterService (org.elasticsearch.cluster.service.ClusterService)17 Collections (java.util.Collections)16 IOException (java.io.IOException)15 CountDownLatch (java.util.concurrent.CountDownLatch)15 TimeUnit (java.util.concurrent.TimeUnit)15 Before (org.junit.Before)15 ActionFilters (org.elasticsearch.action.support.ActionFilters)14 ESTestCase (org.elasticsearch.test.ESTestCase)14 MockTransportService (org.elasticsearch.test.transport.MockTransportService)14 TestThreadPool (org.elasticsearch.threadpool.TestThreadPool)14 HashSet (java.util.HashSet)13 DiscoveryNodes (org.elasticsearch.cluster.node.DiscoveryNodes)13 IndexNameExpressionResolver (org.elasticsearch.cluster.metadata.IndexNameExpressionResolver)12 TransportAddress (org.elasticsearch.common.transport.TransportAddress)12 After (org.junit.After)12