Search in sources :

Example 11 with RestResponseListener

use of org.opensearch.rest.action.RestResponseListener in project OpenSearch by opensearch-project.

the class RestIndicesAction method doCatRequest.

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
    final String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
    final IndicesOptions indicesOptions = IndicesOptions.fromRequest(request, IndicesOptions.strictExpand());
    final boolean local = request.paramAsBoolean("local", false);
    TimeValue clusterManagerTimeout = request.paramAsTime("cluster_manager_timeout", DEFAULT_MASTER_NODE_TIMEOUT);
    // Remove the if condition and statements inside after removing MASTER_ROLE.
    if (request.hasParam("master_timeout")) {
        deprecationLogger.deprecate("cat_indices_master_timeout_parameter", MASTER_TIMEOUT_DEPRECATED_MESSAGE);
        if (request.hasParam("cluster_manager_timeout")) {
            throw new OpenSearchParseException(DUPLICATE_PARAMETER_ERROR_MESSAGE);
        }
        clusterManagerTimeout = request.paramAsTime("master_timeout", DEFAULT_MASTER_NODE_TIMEOUT);
    }
    final TimeValue clusterManagerNodeTimeout = clusterManagerTimeout;
    final boolean includeUnloadedSegments = request.paramAsBoolean("include_unloaded_segments", false);
    return channel -> {
        final ActionListener<Table> listener = ActionListener.notifyOnce(new RestResponseListener<Table>(channel) {

            @Override
            public RestResponse buildResponse(final Table table) throws Exception {
                return RestTable.buildResponse(table, channel);
            }
        });
        sendGetSettingsRequest(indices, indicesOptions, local, clusterManagerNodeTimeout, client, new ActionListener<GetSettingsResponse>() {

            @Override
            public void onResponse(final GetSettingsResponse getSettingsResponse) {
                final GroupedActionListener<ActionResponse> groupedListener = createGroupedListener(request, 4, listener);
                groupedListener.onResponse(getSettingsResponse);
                // The list of indices that will be returned is determined by the indices returned from the Get Settings call.
                // All the other requests just provide additional detail, and wildcards may be resolved differently depending on the
                // type of request in the presence of security plugins (looking at you, ClusterHealthRequest), so
                // force the IndicesOptions for all the sub-requests to be as inclusive as possible.
                final IndicesOptions subRequestIndicesOptions = IndicesOptions.lenientExpandHidden();
                // Indices that were successfully resolved during the get settings request might be deleted when the subsequent
                // cluster
                // state, cluster health and indices stats requests execute. We have to distinguish two cases:
                // 1) the deleted index was explicitly passed as parameter to the /_cat/indices request. In this case we want the
                // subsequent requests to fail.
                // 2) the deleted index was resolved as part of a wildcard or _all. In this case, we want the subsequent requests
                // not to
                // fail on the deleted index (as we want to ignore wildcards that cannot be resolved).
                // This behavior can be ensured by letting the cluster state, cluster health and indices stats requests re-resolve
                // the
                // index names with the same indices options that we used for the initial cluster state request (strictExpand).
                sendIndicesStatsRequest(indices, subRequestIndicesOptions, includeUnloadedSegments, client, ActionListener.wrap(groupedListener::onResponse, groupedListener::onFailure));
                sendClusterStateRequest(indices, subRequestIndicesOptions, local, clusterManagerNodeTimeout, client, ActionListener.wrap(groupedListener::onResponse, groupedListener::onFailure));
                sendClusterHealthRequest(indices, subRequestIndicesOptions, local, clusterManagerNodeTimeout, client, ActionListener.wrap(groupedListener::onResponse, groupedListener::onFailure));
            }

            @Override
            public void onFailure(final Exception e) {
                listener.onFailure(e);
            }
        });
    };
}
Also used : CommonStats(org.opensearch.action.admin.indices.stats.CommonStats) Collections.unmodifiableList(java.util.Collections.unmodifiableList) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) ZonedDateTime(java.time.ZonedDateTime) DEFAULT_MASTER_NODE_TIMEOUT(org.opensearch.action.support.master.MasterNodeRequest.DEFAULT_MASTER_NODE_TIMEOUT) Table(org.opensearch.common.Table) IndicesOptions(org.opensearch.action.support.IndicesOptions) Function(java.util.function.Function) GetSettingsRequest(org.opensearch.action.admin.indices.settings.get.GetSettingsRequest) Strings(org.opensearch.common.Strings) DeprecationLogger(org.opensearch.common.logging.DeprecationLogger) HashSet(java.util.HashSet) GroupedActionListener(org.opensearch.action.support.GroupedActionListener) Locale(java.util.Locale) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) StreamSupport(java.util.stream.StreamSupport) ActionListener(org.opensearch.action.ActionListener) ActionResponse(org.opensearch.action.ActionResponse) ZoneOffset(java.time.ZoneOffset) IndexStats(org.opensearch.action.admin.indices.stats.IndexStats) DateFormatter(org.opensearch.common.time.DateFormatter) RestResponseListener(org.opensearch.rest.action.RestResponseListener) ClusterHealthStatus(org.opensearch.cluster.health.ClusterHealthStatus) ClusterIndexHealth(org.opensearch.cluster.health.ClusterIndexHealth) TimeValue(org.opensearch.common.unit.TimeValue) NodeClient(org.opensearch.client.node.NodeClient) GET(org.opensearch.rest.RestRequest.Method.GET) RestRequest(org.opensearch.rest.RestRequest) Collection(java.util.Collection) OpenSearchParseException(org.opensearch.OpenSearchParseException) Set(java.util.Set) Settings(org.opensearch.common.settings.Settings) IndicesStatsRequest(org.opensearch.action.admin.indices.stats.IndicesStatsRequest) GetSettingsResponse(org.opensearch.action.admin.indices.settings.get.GetSettingsResponse) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) RestResponse(org.opensearch.rest.RestResponse) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) List(java.util.List) ClusterHealthResponse(org.opensearch.action.admin.cluster.health.ClusterHealthResponse) IndexSettings(org.opensearch.index.IndexSettings) IndicesStatsResponse(org.opensearch.action.admin.indices.stats.IndicesStatsResponse) ClusterHealthRequest(org.opensearch.action.admin.cluster.health.ClusterHealthRequest) Collections(java.util.Collections) Table(org.opensearch.common.Table) GetSettingsResponse(org.opensearch.action.admin.indices.settings.get.GetSettingsResponse) RestResponseListener(org.opensearch.rest.action.RestResponseListener) ActionResponse(org.opensearch.action.ActionResponse) OpenSearchParseException(org.opensearch.OpenSearchParseException) OpenSearchParseException(org.opensearch.OpenSearchParseException) GroupedActionListener(org.opensearch.action.support.GroupedActionListener) ActionListener(org.opensearch.action.ActionListener) IndicesOptions(org.opensearch.action.support.IndicesOptions) TimeValue(org.opensearch.common.unit.TimeValue)

Example 12 with RestResponseListener

use of org.opensearch.rest.action.RestResponseListener in project OpenSearch by opensearch-project.

the class RestNodeAttrsAction method doCatRequest.

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
    final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();
    clusterStateRequest.clear().nodes(true);
    clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
    clusterStateRequest.masterNodeTimeout(request.paramAsTime("cluster_manager_timeout", clusterStateRequest.masterNodeTimeout()));
    parseDeprecatedMasterTimeoutParameter(clusterStateRequest, request, deprecationLogger, getName());
    return channel -> client.admin().cluster().state(clusterStateRequest, new RestActionListener<ClusterStateResponse>(channel) {

        @Override
        public void processResponse(final ClusterStateResponse clusterStateResponse) {
            NodesInfoRequest nodesInfoRequest = new NodesInfoRequest();
            nodesInfoRequest.timeout(request.param("timeout"));
            nodesInfoRequest.clear().addMetric(NodesInfoRequest.Metric.PROCESS.metricName());
            client.admin().cluster().nodesInfo(nodesInfoRequest, new RestResponseListener<NodesInfoResponse>(channel) {

                @Override
                public RestResponse buildResponse(NodesInfoResponse nodesInfoResponse) throws Exception {
                    return RestTable.buildResponse(buildTable(request, clusterStateResponse, nodesInfoResponse), channel);
                }
            });
        }
    });
}
Also used : DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) NodeClient(org.opensearch.client.node.NodeClient) GET(org.opensearch.rest.RestRequest.Method.GET) RestRequest(org.opensearch.rest.RestRequest) NodesInfoRequest(org.opensearch.action.admin.cluster.node.info.NodesInfoRequest) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) Table(org.opensearch.common.Table) RestResponse(org.opensearch.rest.RestResponse) Strings(org.opensearch.common.Strings) Collections.singletonList(java.util.Collections.singletonList) NodesInfoResponse(org.opensearch.action.admin.cluster.node.info.NodesInfoResponse) DeprecationLogger(org.opensearch.common.logging.DeprecationLogger) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) RestActionListener(org.opensearch.rest.action.RestActionListener) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) List(java.util.List) ProcessInfo(org.opensearch.monitor.process.ProcessInfo) NodeInfo(org.opensearch.action.admin.cluster.node.info.NodeInfo) Map(java.util.Map) RestResponseListener(org.opensearch.rest.action.RestResponseListener) NodesInfoResponse(org.opensearch.action.admin.cluster.node.info.NodesInfoResponse) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) RestResponseListener(org.opensearch.rest.action.RestResponseListener) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) NodesInfoRequest(org.opensearch.action.admin.cluster.node.info.NodesInfoRequest)

Example 13 with RestResponseListener

use of org.opensearch.rest.action.RestResponseListener in project OpenSearch by opensearch-project.

the class RestNodesAction method doCatRequest.

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
    final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();
    clusterStateRequest.clear().nodes(true);
    if (request.hasParam("local")) {
        deprecationLogger.deprecate("cat_nodes_local_parameter", LOCAL_DEPRECATED_MESSAGE);
    }
    clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
    clusterStateRequest.masterNodeTimeout(request.paramAsTime("cluster_manager_timeout", clusterStateRequest.masterNodeTimeout()));
    parseDeprecatedMasterTimeoutParameter(clusterStateRequest, request, deprecationLogger, getName());
    final boolean fullId = request.paramAsBoolean("full_id", false);
    return channel -> client.admin().cluster().state(clusterStateRequest, new RestActionListener<ClusterStateResponse>(channel) {

        @Override
        public void processResponse(final ClusterStateResponse clusterStateResponse) {
            NodesInfoRequest nodesInfoRequest = new NodesInfoRequest();
            nodesInfoRequest.timeout(request.param("timeout"));
            nodesInfoRequest.clear().addMetrics(NodesInfoRequest.Metric.JVM.metricName(), NodesInfoRequest.Metric.OS.metricName(), NodesInfoRequest.Metric.PROCESS.metricName(), NodesInfoRequest.Metric.HTTP.metricName());
            client.admin().cluster().nodesInfo(nodesInfoRequest, new RestActionListener<NodesInfoResponse>(channel) {

                @Override
                public void processResponse(final NodesInfoResponse nodesInfoResponse) {
                    NodesStatsRequest nodesStatsRequest = new NodesStatsRequest();
                    nodesStatsRequest.timeout(request.param("timeout"));
                    nodesStatsRequest.clear().indices(true).addMetrics(NodesStatsRequest.Metric.JVM.metricName(), NodesStatsRequest.Metric.OS.metricName(), NodesStatsRequest.Metric.FS.metricName(), NodesStatsRequest.Metric.PROCESS.metricName(), NodesStatsRequest.Metric.SCRIPT.metricName());
                    client.admin().cluster().nodesStats(nodesStatsRequest, new RestResponseListener<NodesStatsResponse>(channel) {

                        @Override
                        public RestResponse buildResponse(NodesStatsResponse nodesStatsResponse) throws Exception {
                            return RestTable.buildResponse(buildTable(fullId, request, clusterStateResponse, nodesInfoResponse, nodesStatsResponse), channel);
                        }
                    });
                }
            });
        }
    });
}
Also used : DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) FieldDataStats(org.opensearch.index.fielddata.FieldDataStats) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) SearchStats(org.opensearch.index.search.stats.SearchStats) HttpInfo(org.opensearch.http.HttpInfo) Table(org.opensearch.common.Table) RequestCacheStats(org.opensearch.index.cache.request.RequestCacheStats) ByteSizeValue(org.opensearch.common.unit.ByteSizeValue) Strings(org.opensearch.common.Strings) Collections.singletonList(java.util.Collections.singletonList) DeprecationLogger(org.opensearch.common.logging.DeprecationLogger) OsStats(org.opensearch.monitor.os.OsStats) MergeStats(org.opensearch.index.merge.MergeStats) RestActionListener(org.opensearch.rest.action.RestActionListener) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) RefreshStats(org.opensearch.index.refresh.RefreshStats) JvmStats(org.opensearch.monitor.jvm.JvmStats) Locale(java.util.Locale) JvmInfo(org.opensearch.monitor.jvm.JvmInfo) SegmentsStats(org.opensearch.index.engine.SegmentsStats) RestResponseListener(org.opensearch.rest.action.RestResponseListener) NetworkAddress(org.opensearch.common.network.NetworkAddress) CompletionStats(org.opensearch.search.suggest.completion.CompletionStats) NodeClient(org.opensearch.client.node.NodeClient) GET(org.opensearch.rest.RestRequest.Method.GET) RestRequest(org.opensearch.rest.RestRequest) NodesInfoRequest(org.opensearch.action.admin.cluster.node.info.NodesInfoRequest) ScriptStats(org.opensearch.script.ScriptStats) FlushStats(org.opensearch.index.flush.FlushStats) IndexingStats(org.opensearch.index.shard.IndexingStats) DiscoveryNodeRole(org.opensearch.cluster.node.DiscoveryNodeRole) NodeIndicesStats(org.opensearch.indices.NodeIndicesStats) Collectors(java.util.stream.Collectors) GetStats(org.opensearch.index.get.GetStats) RestResponse(org.opensearch.rest.RestResponse) NodesInfoResponse(org.opensearch.action.admin.cluster.node.info.NodesInfoResponse) TransportAddress(org.opensearch.common.transport.TransportAddress) QueryCacheStats(org.opensearch.index.cache.query.QueryCacheStats) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) List(java.util.List) ProcessInfo(org.opensearch.monitor.process.ProcessInfo) NodeInfo(org.opensearch.action.admin.cluster.node.info.NodeInfo) NodesStatsResponse(org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse) NodeStats(org.opensearch.action.admin.cluster.node.stats.NodeStats) NodesStatsRequest(org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest) ProcessStats(org.opensearch.monitor.process.ProcessStats) FsInfo(org.opensearch.monitor.fs.FsInfo) NodesInfoResponse(org.opensearch.action.admin.cluster.node.info.NodesInfoResponse) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) RestResponse(org.opensearch.rest.RestResponse) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) RestActionListener(org.opensearch.rest.action.RestActionListener) NodesStatsRequest(org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest) NodesStatsResponse(org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse) NodesInfoRequest(org.opensearch.action.admin.cluster.node.info.NodesInfoRequest)

Example 14 with RestResponseListener

use of org.opensearch.rest.action.RestResponseListener in project OpenSearch by opensearch-project.

the class RestPluginsAction method doCatRequest.

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
    final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();
    clusterStateRequest.clear().nodes(true);
    clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
    clusterStateRequest.masterNodeTimeout(request.paramAsTime("cluster_manager_timeout", clusterStateRequest.masterNodeTimeout()));
    parseDeprecatedMasterTimeoutParameter(clusterStateRequest, request, deprecationLogger, getName());
    return channel -> client.admin().cluster().state(clusterStateRequest, new RestActionListener<ClusterStateResponse>(channel) {

        @Override
        public void processResponse(final ClusterStateResponse clusterStateResponse) throws Exception {
            NodesInfoRequest nodesInfoRequest = new NodesInfoRequest();
            nodesInfoRequest.timeout(request.param("timeout"));
            nodesInfoRequest.clear().addMetric(NodesInfoRequest.Metric.PLUGINS.metricName());
            client.admin().cluster().nodesInfo(nodesInfoRequest, new RestResponseListener<NodesInfoResponse>(channel) {

                @Override
                public RestResponse buildResponse(final NodesInfoResponse nodesInfoResponse) throws Exception {
                    return RestTable.buildResponse(buildTable(request, clusterStateResponse, nodesInfoResponse), channel);
                }
            });
        }
    });
}
Also used : DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) NodeClient(org.opensearch.client.node.NodeClient) GET(org.opensearch.rest.RestRequest.Method.GET) RestRequest(org.opensearch.rest.RestRequest) NodesInfoRequest(org.opensearch.action.admin.cluster.node.info.NodesInfoRequest) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) Table(org.opensearch.common.Table) PluginInfo(org.opensearch.plugins.PluginInfo) RestResponse(org.opensearch.rest.RestResponse) Collections.singletonList(java.util.Collections.singletonList) NodesInfoResponse(org.opensearch.action.admin.cluster.node.info.NodesInfoResponse) DeprecationLogger(org.opensearch.common.logging.DeprecationLogger) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) RestActionListener(org.opensearch.rest.action.RestActionListener) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) List(java.util.List) NodeInfo(org.opensearch.action.admin.cluster.node.info.NodeInfo) PluginsAndModules(org.opensearch.action.admin.cluster.node.info.PluginsAndModules) RestResponseListener(org.opensearch.rest.action.RestResponseListener) NodesInfoResponse(org.opensearch.action.admin.cluster.node.info.NodesInfoResponse) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) RestResponseListener(org.opensearch.rest.action.RestResponseListener) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) NodesInfoRequest(org.opensearch.action.admin.cluster.node.info.NodesInfoRequest)

Example 15 with RestResponseListener

use of org.opensearch.rest.action.RestResponseListener in project OpenSearch by opensearch-project.

the class RestSegmentsAction method doCatRequest.

@Override
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {
    final String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
    final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();
    clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
    clusterStateRequest.masterNodeTimeout(request.paramAsTime("cluster_manager_timeout", clusterStateRequest.masterNodeTimeout()));
    parseDeprecatedMasterTimeoutParameter(clusterStateRequest, request, deprecationLogger, getName());
    clusterStateRequest.clear().nodes(true).routingTable(true).indices(indices);
    return channel -> client.admin().cluster().state(clusterStateRequest, new RestActionListener<ClusterStateResponse>(channel) {

        @Override
        public void processResponse(final ClusterStateResponse clusterStateResponse) {
            final IndicesSegmentsRequest indicesSegmentsRequest = new IndicesSegmentsRequest();
            indicesSegmentsRequest.indices(indices);
            client.admin().indices().segments(indicesSegmentsRequest, new RestResponseListener<IndicesSegmentResponse>(channel) {

                @Override
                public RestResponse buildResponse(final IndicesSegmentResponse indicesSegmentResponse) throws Exception {
                    final Map<String, IndexSegments> indicesSegments = indicesSegmentResponse.getIndices();
                    Table tab = buildTable(request, clusterStateResponse, indicesSegments);
                    return RestTable.buildResponse(tab, channel);
                }
            });
        }
    });
}
Also used : ShardSegments(org.opensearch.action.admin.indices.segments.ShardSegments) DiscoveryNodes(org.opensearch.cluster.node.DiscoveryNodes) IndicesSegmentsRequest(org.opensearch.action.admin.indices.segments.IndicesSegmentsRequest) NodeClient(org.opensearch.client.node.NodeClient) Collections.unmodifiableList(java.util.Collections.unmodifiableList) GET(org.opensearch.rest.RestRequest.Method.GET) IndexSegments(org.opensearch.action.admin.indices.segments.IndexSegments) RestRequest(org.opensearch.rest.RestRequest) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) IndexShardSegments(org.opensearch.action.admin.indices.segments.IndexShardSegments) Table(org.opensearch.common.Table) RestResponse(org.opensearch.rest.RestResponse) Strings(org.opensearch.common.Strings) DeprecationLogger(org.opensearch.common.logging.DeprecationLogger) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) RestActionListener(org.opensearch.rest.action.RestActionListener) List(java.util.List) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) Segment(org.opensearch.index.engine.Segment) IndicesSegmentResponse(org.opensearch.action.admin.indices.segments.IndicesSegmentResponse) RestResponseListener(org.opensearch.rest.action.RestResponseListener) Table(org.opensearch.common.Table) ClusterStateResponse(org.opensearch.action.admin.cluster.state.ClusterStateResponse) RestResponseListener(org.opensearch.rest.action.RestResponseListener) ClusterStateRequest(org.opensearch.action.admin.cluster.state.ClusterStateRequest) IndicesSegmentResponse(org.opensearch.action.admin.indices.segments.IndicesSegmentResponse) IndicesSegmentsRequest(org.opensearch.action.admin.indices.segments.IndicesSegmentsRequest) IndexSegments(org.opensearch.action.admin.indices.segments.IndexSegments)

Aggregations

RestResponseListener (org.opensearch.rest.action.RestResponseListener)20 List (java.util.List)18 NodeClient (org.opensearch.client.node.NodeClient)18 RestRequest (org.opensearch.rest.RestRequest)18 GET (org.opensearch.rest.RestRequest.Method.GET)18 RestResponse (org.opensearch.rest.RestResponse)18 Table (org.opensearch.common.Table)17 DeprecationLogger (org.opensearch.common.logging.DeprecationLogger)13 Arrays.asList (java.util.Arrays.asList)12 Collections.unmodifiableList (java.util.Collections.unmodifiableList)12 ClusterStateRequest (org.opensearch.action.admin.cluster.state.ClusterStateRequest)10 ClusterStateResponse (org.opensearch.action.admin.cluster.state.ClusterStateResponse)10 Strings (org.opensearch.common.Strings)9 Collections.singletonList (java.util.Collections.singletonList)6 DiscoveryNode (org.opensearch.cluster.node.DiscoveryNode)6 DiscoveryNodes (org.opensearch.cluster.node.DiscoveryNodes)6 RestActionListener (org.opensearch.rest.action.RestActionListener)6 Locale (java.util.Locale)5 Map (java.util.Map)5 TimeValue (org.opensearch.common.unit.TimeValue)5