Search in sources :

Example 6 with ShardStateAction

use of org.elasticsearch.cluster.action.shard.ShardStateAction in project elasticsearch by elastic.

the class GlobalCheckpointSyncActionTests method setUp.

public void setUp() throws Exception {
    super.setUp();
    threadPool = new TestThreadPool(getClass().getName());
    transport = new CapturingTransport();
    clusterService = createClusterService(threadPool);
    transportService = new TransportService(clusterService.getSettings(), transport, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, boundAddress -> clusterService.localNode(), null);
    transportService.start();
    transportService.acceptIncomingRequests();
    shardStateAction = new ShardStateAction(Settings.EMPTY, clusterService, transportService, null, null, threadPool);
}
Also used : ShardId(org.elasticsearch.index.shard.ShardId) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool) ActionFilters(org.elasticsearch.action.support.ActionFilters) Transport(org.elasticsearch.transport.Transport) ClusterServiceUtils.createClusterService(org.elasticsearch.test.ClusterServiceUtils.createClusterService) IndexService(org.elasticsearch.index.IndexService) IndexShard(org.elasticsearch.index.shard.IndexShard) ClusterService(org.elasticsearch.cluster.service.ClusterService) IOUtils(org.apache.lucene.util.IOUtils) Index(org.elasticsearch.index.Index) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) Mockito.verify(org.mockito.Mockito.verify) Settings(org.elasticsearch.common.settings.Settings) ShardStateAction(org.elasticsearch.cluster.action.shard.ShardStateAction) Translog(org.elasticsearch.index.translog.Translog) ThreadPool(org.elasticsearch.threadpool.ThreadPool) IndicesService(org.elasticsearch.indices.IndicesService) ESTestCase(org.elasticsearch.test.ESTestCase) TransportService(org.elasticsearch.transport.TransportService) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) Collections(java.util.Collections) Mockito.when(org.elasticsearch.mock.orig.Mockito.when) Mockito.mock(org.mockito.Mockito.mock) TransportService(org.elasticsearch.transport.TransportService) CapturingTransport(org.elasticsearch.test.transport.CapturingTransport) ShardStateAction(org.elasticsearch.cluster.action.shard.ShardStateAction) TestThreadPool(org.elasticsearch.threadpool.TestThreadPool)

Aggregations

ShardStateAction (org.elasticsearch.cluster.action.shard.ShardStateAction)6 TransportService (org.elasticsearch.transport.TransportService)6 Collections (java.util.Collections)4 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)4 ClusterService (org.elasticsearch.cluster.service.ClusterService)4 Settings (org.elasticsearch.common.settings.Settings)4 TimeUnit (java.util.concurrent.TimeUnit)3 AtomicReference (java.util.concurrent.atomic.AtomicReference)3 ElasticsearchException (org.elasticsearch.ElasticsearchException)3 ActionFilters (org.elasticsearch.action.support.ActionFilters)3 TestThreadPool (org.elasticsearch.threadpool.TestThreadPool)3 ThreadPool (org.elasticsearch.threadpool.ThreadPool)3 IOException (java.io.IOException)2 HashSet (java.util.HashSet)2 List (java.util.List)2 ExecutionException (java.util.concurrent.ExecutionException)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 Collectors (java.util.stream.Collectors)2 ActionListener (org.elasticsearch.action.ActionListener)2 PlainActionFuture (org.elasticsearch.action.support.PlainActionFuture)2