Search in sources :

Example 71 with NamedWriteableRegistry

use of org.opensearch.common.io.stream.NamedWriteableRegistry in project OpenSearch by opensearch-project.

the class TransportSearchAction method executeRequest.

private void executeRequest(Task task, SearchRequest searchRequest, SearchAsyncActionProvider searchAsyncActionProvider, ActionListener<SearchResponse> listener) {
    final long relativeStartNanos = System.nanoTime();
    final SearchTimeProvider timeProvider = new SearchTimeProvider(searchRequest.getOrCreateAbsoluteStartMillis(), relativeStartNanos, System::nanoTime);
    ActionListener<SearchSourceBuilder> rewriteListener = ActionListener.wrap(source -> {
        if (source != searchRequest.source()) {
            // only set it if it changed - we don't allow null values to be set but it might be already null. this way we catch
            // situations when source is rewritten to null due to a bug
            searchRequest.source(source);
        }
        final ClusterState clusterState = clusterService.state();
        final SearchContextId searchContext;
        final Map<String, OriginalIndices> remoteClusterIndices;
        if (searchRequest.pointInTimeBuilder() != null) {
            searchContext = SearchContextId.decode(namedWriteableRegistry, searchRequest.pointInTimeBuilder().getId());
            remoteClusterIndices = getIndicesFromSearchContexts(searchContext, searchRequest.indicesOptions());
        } else {
            searchContext = null;
            remoteClusterIndices = remoteClusterService.groupIndices(searchRequest.indicesOptions(), searchRequest.indices(), idx -> indexNameExpressionResolver.hasIndexAbstraction(idx, clusterState));
        }
        OriginalIndices localIndices = remoteClusterIndices.remove(RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY);
        if (remoteClusterIndices.isEmpty()) {
            executeLocalSearch(task, timeProvider, searchRequest, localIndices, clusterState, listener, searchContext, searchAsyncActionProvider);
        } else {
            if (shouldMinimizeRoundtrips(searchRequest)) {
                ccsRemoteReduce(searchRequest, localIndices, remoteClusterIndices, timeProvider, searchService.aggReduceContextBuilder(searchRequest), remoteClusterService, threadPool, listener, (r, l) -> executeLocalSearch(task, timeProvider, r, localIndices, clusterState, l, searchContext, searchAsyncActionProvider));
            } else {
                AtomicInteger skippedClusters = new AtomicInteger(0);
                collectSearchShards(searchRequest.indicesOptions(), searchRequest.preference(), searchRequest.routing(), skippedClusters, remoteClusterIndices, remoteClusterService, threadPool, ActionListener.wrap(searchShardsResponses -> {
                    final BiFunction<String, String, DiscoveryNode> clusterNodeLookup = getRemoteClusterNodeLookup(searchShardsResponses);
                    final Map<String, AliasFilter> remoteAliasFilters;
                    final List<SearchShardIterator> remoteShardIterators;
                    if (searchContext != null) {
                        remoteAliasFilters = searchContext.aliasFilter();
                        remoteShardIterators = getRemoteShardsIteratorFromPointInTime(searchShardsResponses, searchContext, searchRequest.pointInTimeBuilder().getKeepAlive(), remoteClusterIndices);
                    } else {
                        remoteAliasFilters = getRemoteAliasFilters(searchShardsResponses);
                        remoteShardIterators = getRemoteShardsIterator(searchShardsResponses, remoteClusterIndices, remoteAliasFilters);
                    }
                    int localClusters = localIndices == null ? 0 : 1;
                    int totalClusters = remoteClusterIndices.size() + localClusters;
                    int successfulClusters = searchShardsResponses.size() + localClusters;
                    executeSearch((SearchTask) task, timeProvider, searchRequest, localIndices, remoteShardIterators, clusterNodeLookup, clusterState, remoteAliasFilters, listener, new SearchResponse.Clusters(totalClusters, successfulClusters, skippedClusters.get()), searchContext, searchAsyncActionProvider);
                }, listener::onFailure));
            }
        }
    }, listener::onFailure);
    if (searchRequest.source() == null) {
        rewriteListener.onResponse(searchRequest.source());
    } else {
        Rewriteable.rewriteAndFetch(searchRequest.source(), searchService.getRewriteContext(timeProvider::getAbsoluteStartMillis), rewriteListener);
    }
}
Also used : RemoteClusterAware(org.opensearch.transport.RemoteClusterAware) Arrays(java.util.Arrays) LongSupplier(java.util.function.LongSupplier) CountDown(org.opensearch.common.util.concurrent.CountDown) ProfileShardResult(org.opensearch.search.profile.ProfileShardResult) SearchContext(org.opensearch.search.internal.SearchContext) BiFunction(java.util.function.BiFunction) ClusterSearchShardsResponse(org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse) CircuitBreaker(org.opensearch.common.breaker.CircuitBreaker) DFS_QUERY_THEN_FETCH(org.opensearch.action.search.SearchType.DFS_QUERY_THEN_FETCH) Strings(org.opensearch.common.Strings) Transport(org.opensearch.transport.Transport) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) QUERY_THEN_FETCH(org.opensearch.action.search.SearchType.QUERY_THEN_FETCH) Property(org.opensearch.common.settings.Setting.Property) InternalAggregations(org.opensearch.search.aggregations.InternalAggregations) AliasFilter(org.opensearch.search.internal.AliasFilter) Map(java.util.Map) Inject(org.opensearch.common.inject.Inject) ActionListener(org.opensearch.action.ActionListener) CancellableTask(org.opensearch.tasks.CancellableTask) Client(org.opensearch.client.Client) TimeValue(org.opensearch.common.unit.TimeValue) NodeClient(org.opensearch.client.node.NodeClient) Index(org.opensearch.index.Index) RemoteTransportException(org.opensearch.transport.RemoteTransportException) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) 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) OriginalIndices(org.opensearch.action.OriginalIndices) Nullable(org.opensearch.common.Nullable) ActionFilters(org.opensearch.action.support.ActionFilters) OperationRouting(org.opensearch.cluster.routing.OperationRouting) List(java.util.List) SearchPhaseResult(org.opensearch.search.SearchPhaseResult) SearchSourceBuilder(org.opensearch.search.builder.SearchSourceBuilder) InternalAggregation(org.opensearch.search.aggregations.InternalAggregation) IndexNameExpressionResolver(org.opensearch.cluster.metadata.IndexNameExpressionResolver) SearchProfileShardResults(org.opensearch.search.profile.SearchProfileShardResults) DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) HandledTransportAction(org.opensearch.action.support.HandledTransportAction) FieldSortBuilder.hasPrimaryFieldSort(org.opensearch.search.sort.FieldSortBuilder.hasPrimaryFieldSort) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) ShardIterator(org.opensearch.cluster.routing.ShardIterator) ThreadPool(org.opensearch.threadpool.ThreadPool) HashMap(java.util.HashMap) IndicesOptions(org.opensearch.action.support.IndicesOptions) Writeable(org.opensearch.common.io.stream.Writeable) TimeoutTaskCancellationUtility(org.opensearch.action.support.TimeoutTaskCancellationUtility) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) NamedWriteableRegistry(org.opensearch.common.io.stream.NamedWriteableRegistry) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) ClusterState(org.opensearch.cluster.ClusterState) BiConsumer(java.util.function.BiConsumer) StreamSupport(java.util.stream.StreamSupport) SearchService(org.opensearch.search.SearchService) TASKS_ORIGIN(org.opensearch.action.admin.cluster.node.tasks.get.GetTaskAction.TASKS_ORIGIN) Setting(org.opensearch.common.settings.Setting) RemoteClusterService(org.opensearch.transport.RemoteClusterService) Executor(java.util.concurrent.Executor) ClusterBlockLevel(org.opensearch.cluster.block.ClusterBlockLevel) Rewriteable(org.opensearch.index.query.Rewriteable) TaskId(org.opensearch.tasks.TaskId) InternalSearchResponse(org.opensearch.search.internal.InternalSearchResponse) ClusterSearchShardsGroup(org.opensearch.action.admin.cluster.shards.ClusterSearchShardsGroup) ClusterSearchShardsRequest(org.opensearch.action.admin.cluster.shards.ClusterSearchShardsRequest) ShardId(org.opensearch.index.shard.ShardId) TimeUnit(java.util.concurrent.TimeUnit) GroupShardsIterator(org.opensearch.cluster.routing.GroupShardsIterator) AtomicArray(org.opensearch.common.util.concurrent.AtomicArray) SearchShardTarget(org.opensearch.search.SearchShardTarget) CancelTasksRequest(org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest) CircuitBreakerService(org.opensearch.indices.breaker.CircuitBreakerService) ClusterService(org.opensearch.cluster.service.ClusterService) Collections(java.util.Collections) OriginSettingClient(org.opensearch.client.OriginSettingClient) ClusterState(org.opensearch.cluster.ClusterState) SearchSourceBuilder(org.opensearch.search.builder.SearchSourceBuilder) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) BiFunction(java.util.function.BiFunction) List(java.util.List) ArrayList(java.util.ArrayList) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) OriginalIndices(org.opensearch.action.OriginalIndices)

Example 72 with NamedWriteableRegistry

use of org.opensearch.common.io.stream.NamedWriteableRegistry in project OpenSearch by opensearch-project.

the class RestReindexActionTests method testPipelineQueryParameterIsError.

public void testPipelineQueryParameterIsError() throws IOException {
    FakeRestRequest.Builder request = new FakeRestRequest.Builder(xContentRegistry());
    try (XContentBuilder body = JsonXContent.contentBuilder().prettyPrint()) {
        body.startObject();
        {
            body.startObject("source");
            {
                body.field("index", "source");
            }
            body.endObject();
            body.startObject("dest");
            {
                body.field("index", "dest");
            }
            body.endObject();
        }
        body.endObject();
        request.withContent(BytesReference.bytes(body), body.contentType());
    }
    request.withParams(singletonMap("pipeline", "doesn't matter"));
    Exception e = expectThrows(IllegalArgumentException.class, () -> action.buildRequest(request.build(), new NamedWriteableRegistry(Collections.emptyList())));
    assertEquals("_reindex doesn't support [pipeline] as a query parameter. Specify it in the [dest] object instead.", e.getMessage());
}
Also used : NamedWriteableRegistry(org.opensearch.common.io.stream.NamedWriteableRegistry) XContentBuilder(org.opensearch.common.xcontent.XContentBuilder) FakeRestRequest(org.opensearch.test.rest.FakeRestRequest) XContentBuilder(org.opensearch.common.xcontent.XContentBuilder) IOException(java.io.IOException)

Example 73 with NamedWriteableRegistry

use of org.opensearch.common.io.stream.NamedWriteableRegistry in project OpenSearch by opensearch-project.

the class QueryBuilderBWCIT method testQueryBuilderBWC.

public void testQueryBuilderBWC() throws Exception {
    final String type = getOldClusterVersion().before(LegacyESVersion.V_7_0_0) ? "doc" : "_doc";
    String index = "queries";
    if (isRunningAgainstOldCluster()) {
        XContentBuilder mappingsAndSettings = jsonBuilder();
        mappingsAndSettings.startObject();
        {
            mappingsAndSettings.startObject("settings");
            mappingsAndSettings.field("number_of_shards", 1);
            mappingsAndSettings.field("number_of_replicas", 0);
            mappingsAndSettings.endObject();
        }
        {
            mappingsAndSettings.startObject("mappings");
            if (isRunningAgainstAncientCluster()) {
                mappingsAndSettings.startObject(type);
            }
            mappingsAndSettings.startObject("properties");
            {
                mappingsAndSettings.startObject("query");
                mappingsAndSettings.field("type", "percolator");
                mappingsAndSettings.endObject();
            }
            {
                mappingsAndSettings.startObject("keyword_field");
                mappingsAndSettings.field("type", "keyword");
                mappingsAndSettings.endObject();
            }
            {
                mappingsAndSettings.startObject("long_field");
                mappingsAndSettings.field("type", "long");
                mappingsAndSettings.endObject();
            }
            mappingsAndSettings.endObject();
            mappingsAndSettings.endObject();
            if (isRunningAgainstAncientCluster()) {
                mappingsAndSettings.endObject();
            }
        }
        mappingsAndSettings.endObject();
        Request request = new Request("PUT", "/" + index);
        request.setOptions(allowTypesRemovalWarnings());
        request.setJsonEntity(Strings.toString(mappingsAndSettings));
        Response rsp = client().performRequest(request);
        assertEquals(200, rsp.getStatusLine().getStatusCode());
        for (int i = 0; i < CANDIDATES.size(); i++) {
            request = new Request("PUT", "/" + index + "/" + type + "/" + Integer.toString(i));
            request.setJsonEntity((String) CANDIDATES.get(i)[0]);
            rsp = client().performRequest(request);
            assertEquals(201, rsp.getStatusLine().getStatusCode());
        }
    } else {
        NamedWriteableRegistry registry = new NamedWriteableRegistry(new SearchModule(Settings.EMPTY, Collections.emptyList()).getNamedWriteables());
        for (int i = 0; i < CANDIDATES.size(); i++) {
            QueryBuilder expectedQueryBuilder = (QueryBuilder) CANDIDATES.get(i)[1];
            Request request = new Request("GET", "/" + index + "/_search");
            request.setJsonEntity("{\"query\": {\"ids\": {\"values\": [\"" + Integer.toString(i) + "\"]}}, " + "\"docvalue_fields\": [{\"field\":\"query.query_builder_field\"}]}");
            Response rsp = client().performRequest(request);
            assertEquals(200, rsp.getStatusLine().getStatusCode());
            Map<?, ?> hitRsp = (Map<?, ?>) ((List<?>) ((Map<?, ?>) toMap(rsp).get("hits")).get("hits")).get(0);
            String queryBuilderStr = (String) ((List<?>) ((Map<?, ?>) hitRsp.get("fields")).get("query.query_builder_field")).get(0);
            byte[] qbSource = Base64.getDecoder().decode(queryBuilderStr);
            try (InputStream in = new ByteArrayInputStream(qbSource, 0, qbSource.length)) {
                try (StreamInput input = new NamedWriteableAwareStreamInput(new InputStreamStreamInput(in), registry)) {
                    input.setVersion(getOldClusterVersion());
                    QueryBuilder queryBuilder = input.readNamedWriteable(QueryBuilder.class);
                    assert in.read() == -1;
                    assertEquals(expectedQueryBuilder, queryBuilder);
                }
            }
        }
    }
}
Also used : NamedWriteableRegistry(org.opensearch.common.io.stream.NamedWriteableRegistry) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) Request(org.opensearch.client.Request) DisMaxQueryBuilder(org.opensearch.index.query.DisMaxQueryBuilder) ConstantScoreQueryBuilder(org.opensearch.index.query.ConstantScoreQueryBuilder) SpanTermQueryBuilder(org.opensearch.index.query.SpanTermQueryBuilder) MatchPhraseQueryBuilder(org.opensearch.index.query.MatchPhraseQueryBuilder) RangeQueryBuilder(org.opensearch.index.query.RangeQueryBuilder) SpanNearQueryBuilder(org.opensearch.index.query.SpanNearQueryBuilder) QueryBuilder(org.opensearch.index.query.QueryBuilder) MatchQueryBuilder(org.opensearch.index.query.MatchQueryBuilder) MatchAllQueryBuilder(org.opensearch.index.query.MatchAllQueryBuilder) FunctionScoreQueryBuilder(org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder) BoolQueryBuilder(org.opensearch.index.query.BoolQueryBuilder) Response(org.opensearch.client.Response) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStreamStreamInput(org.opensearch.common.io.stream.InputStreamStreamInput) NamedWriteableAwareStreamInput(org.opensearch.common.io.stream.NamedWriteableAwareStreamInput) StreamInput(org.opensearch.common.io.stream.StreamInput) SearchModule(org.opensearch.search.SearchModule) NamedWriteableAwareStreamInput(org.opensearch.common.io.stream.NamedWriteableAwareStreamInput) Map(java.util.Map) XContentBuilder(org.opensearch.common.xcontent.XContentBuilder) InputStreamStreamInput(org.opensearch.common.io.stream.InputStreamStreamInput)

Example 74 with NamedWriteableRegistry

use of org.opensearch.common.io.stream.NamedWriteableRegistry in project OpenSearch by opensearch-project.

the class TransportResyncReplicationActionTests method testResyncDoesNotBlockOnPrimaryAction.

public void testResyncDoesNotBlockOnPrimaryAction() throws Exception {
    try (ClusterService clusterService = createClusterService(threadPool)) {
        final String indexName = randomAlphaOfLength(5);
        setState(clusterService, state(indexName, true, ShardRoutingState.STARTED));
        setState(clusterService, ClusterState.builder(clusterService.state()).blocks(ClusterBlocks.builder().addGlobalBlock(NoMasterBlockService.NO_MASTER_BLOCK_ALL).addIndexBlock(indexName, IndexMetadata.INDEX_WRITE_BLOCK)));
        try (MockNioTransport transport = new MockNioTransport(Settings.EMPTY, Version.CURRENT, threadPool, new NetworkService(emptyList()), PageCacheRecycler.NON_RECYCLING_INSTANCE, new NamedWriteableRegistry(emptyList()), new NoneCircuitBreakerService())) {
            final MockTransportService transportService = new MockTransportService(Settings.EMPTY, transport, threadPool, NOOP_TRANSPORT_INTERCEPTOR, x -> clusterService.localNode(), null, Collections.emptySet());
            transportService.start();
            transportService.acceptIncomingRequests();
            final ShardStateAction shardStateAction = new ShardStateAction(clusterService, transportService, null, null, threadPool);
            final IndexMetadata indexMetadata = clusterService.state().metadata().index(indexName);
            final Index index = indexMetadata.getIndex();
            final ShardId shardId = new ShardId(index, 0);
            final IndexShardRoutingTable shardRoutingTable = clusterService.state().routingTable().shardRoutingTable(shardId);
            final ShardRouting primaryShardRouting = clusterService.state().routingTable().shardRoutingTable(shardId).primaryShard();
            final String allocationId = primaryShardRouting.allocationId().getId();
            final long primaryTerm = indexMetadata.primaryTerm(shardId.id());
            final AtomicInteger acquiredPermits = new AtomicInteger();
            final IndexShard indexShard = mock(IndexShard.class);
            when(indexShard.indexSettings()).thenReturn(new IndexSettings(indexMetadata, Settings.EMPTY));
            when(indexShard.shardId()).thenReturn(shardId);
            when(indexShard.routingEntry()).thenReturn(primaryShardRouting);
            when(indexShard.getPendingPrimaryTerm()).thenReturn(primaryTerm);
            when(indexShard.getOperationPrimaryTerm()).thenReturn(primaryTerm);
            when(indexShard.getActiveOperationsCount()).then(i -> acquiredPermits.get());
            doAnswer(invocation -> {
                ActionListener<Releasable> callback = (ActionListener<Releasable>) invocation.getArguments()[0];
                acquiredPermits.incrementAndGet();
                callback.onResponse(acquiredPermits::decrementAndGet);
                return null;
            }).when(indexShard).acquirePrimaryOperationPermit(any(ActionListener.class), anyString(), any(), eq(true));
            when(indexShard.getReplicationGroup()).thenReturn(new ReplicationGroup(shardRoutingTable, clusterService.state().metadata().index(index).inSyncAllocationIds(shardId.id()), shardRoutingTable.getAllAllocationIds(), 0));
            final IndexService indexService = mock(IndexService.class);
            when(indexService.getShard(eq(shardId.id()))).thenReturn(indexShard);
            final IndicesService indexServices = mock(IndicesService.class);
            when(indexServices.indexServiceSafe(eq(index))).thenReturn(indexService);
            final TransportResyncReplicationAction action = new TransportResyncReplicationAction(Settings.EMPTY, transportService, clusterService, indexServices, threadPool, shardStateAction, new ActionFilters(new HashSet<>()), new IndexingPressureService(Settings.EMPTY, clusterService), new SystemIndices(emptyMap()));
            assertThat(action.globalBlockLevel(), nullValue());
            assertThat(action.indexBlockLevel(), nullValue());
            final Task task = mock(Task.class);
            when(task.getId()).thenReturn(randomNonNegativeLong());
            final byte[] bytes = "{}".getBytes(Charset.forName("UTF-8"));
            final ResyncReplicationRequest request = new ResyncReplicationRequest(shardId, 42L, 100, new Translog.Operation[] { new Translog.Index("type", "id", 0, primaryTerm, 0L, bytes, null, -1) });
            final PlainActionFuture<ResyncReplicationResponse> listener = new PlainActionFuture<>();
            action.sync(request, task, allocationId, primaryTerm, listener);
            assertThat(listener.get().getShardInfo().getFailed(), equalTo(0));
            assertThat(listener.isDone(), is(true));
        }
    }
}
Also used : NamedWriteableRegistry(org.opensearch.common.io.stream.NamedWriteableRegistry) IndexShardRoutingTable(org.opensearch.cluster.routing.IndexShardRoutingTable) Task(org.opensearch.tasks.Task) MockTransportService(org.opensearch.test.transport.MockTransportService) IndexService(org.opensearch.index.IndexService) IndexSettings(org.opensearch.index.IndexSettings) Index(org.opensearch.index.Index) Mockito.anyString(org.mockito.Mockito.anyString) ShardStateAction(org.opensearch.cluster.action.shard.ShardStateAction) ReplicationGroup(org.opensearch.index.shard.ReplicationGroup) Translog(org.opensearch.index.translog.Translog) ShardId(org.opensearch.index.shard.ShardId) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) HashSet(java.util.HashSet) IndexingPressureService(org.opensearch.index.IndexingPressureService) IndexShard(org.opensearch.index.shard.IndexShard) IndicesService(org.opensearch.indices.IndicesService) ActionFilters(org.opensearch.action.support.ActionFilters) ClusterServiceUtils.createClusterService(org.opensearch.test.ClusterServiceUtils.createClusterService) ClusterService(org.opensearch.cluster.service.ClusterService) ActionListener(org.opensearch.action.ActionListener) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) MockNioTransport(org.opensearch.transport.nio.MockNioTransport) NetworkService(org.opensearch.common.network.NetworkService) Releasable(org.opensearch.common.lease.Releasable) ShardRouting(org.opensearch.cluster.routing.ShardRouting) SystemIndices(org.opensearch.indices.SystemIndices) NoneCircuitBreakerService(org.opensearch.indices.breaker.NoneCircuitBreakerService)

Example 75 with NamedWriteableRegistry

use of org.opensearch.common.io.stream.NamedWriteableRegistry in project OpenSearch by opensearch-project.

the class ExplainRequestTests method setUp.

public void setUp() throws Exception {
    super.setUp();
    IndicesModule indicesModule = new IndicesModule(Collections.emptyList());
    SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
    List<NamedWriteableRegistry.Entry> entries = new ArrayList<>();
    entries.addAll(indicesModule.getNamedWriteables());
    entries.addAll(searchModule.getNamedWriteables());
    namedWriteableRegistry = new NamedWriteableRegistry(entries);
}
Also used : NamedWriteableRegistry(org.opensearch.common.io.stream.NamedWriteableRegistry) IndicesModule(org.opensearch.indices.IndicesModule) ArrayList(java.util.ArrayList) SearchModule(org.opensearch.search.SearchModule)

Aggregations

NamedWriteableRegistry (org.opensearch.common.io.stream.NamedWriteableRegistry)117 ThreadPool (org.opensearch.threadpool.ThreadPool)41 DiscoveryNode (org.opensearch.cluster.node.DiscoveryNode)37 ClusterService (org.opensearch.cluster.service.ClusterService)37 TestThreadPool (org.opensearch.threadpool.TestThreadPool)37 AsynchronousSearchActiveStore (org.opensearch.search.asynchronous.context.active.AsynchronousSearchActiveStore)33 InternalAsynchronousSearchStats (org.opensearch.search.asynchronous.stats.InternalAsynchronousSearchStats)32 SubmitAsynchronousSearchRequest (org.opensearch.search.asynchronous.request.SubmitAsynchronousSearchRequest)30 TimeValue (org.opensearch.common.unit.TimeValue)29 SearchRequest (org.opensearch.action.search.SearchRequest)28 CountDownLatch (java.util.concurrent.CountDownLatch)26 User (org.opensearch.commons.authuser.User)24 AsynchronousSearchActiveContext (org.opensearch.search.asynchronous.context.active.AsynchronousSearchActiveContext)23 AsynchronousSearchTask (org.opensearch.search.asynchronous.task.AsynchronousSearchTask)22 NamedWriteableAwareStreamInput (org.opensearch.common.io.stream.NamedWriteableAwareStreamInput)21 SearchModule (org.opensearch.search.SearchModule)20 StreamInput (org.opensearch.common.io.stream.StreamInput)19 BytesStreamOutput (org.opensearch.common.io.stream.BytesStreamOutput)18 ArrayList (java.util.ArrayList)16 Version (org.opensearch.Version)16