org.elasticsearch.client.IndicesAdminClient.stats()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(199)

本文整理了Java中org.elasticsearch.client.IndicesAdminClient.stats()方法的一些代码示例,展示了IndicesAdminClient.stats()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IndicesAdminClient.stats()方法的具体详情如下:
包路径:org.elasticsearch.client.IndicesAdminClient
类名称:IndicesAdminClient
方法名:stats

IndicesAdminClient.stats介绍

[英]Indices stats.
[中]指数统计。

代码示例

代码示例来源:origin: floragunncom/search-guard

IndicesStatsResponse nir = tc.admin().indices().stats(new IndicesStatsRequest()).actionGet();
  sb.append(Strings.toString(nir, true, true));
} catch (Exception e1) {

代码示例来源:origin: org.elasticsearch/elasticsearch

/**
 * Retrieve the latest indices stats, calling the listener when complete
 * @return a latch that can be used to wait for the indices stats to complete if desired
 */
protected CountDownLatch updateIndicesStats(final ActionListener<IndicesStatsResponse> listener) {
  final CountDownLatch latch = new CountDownLatch(1);
  final IndicesStatsRequest indicesStatsRequest = new IndicesStatsRequest();
  indicesStatsRequest.clear();
  indicesStatsRequest.store(true);
  client.admin().indices().stats(indicesStatsRequest, new LatchedActionListener<>(listener, latch));
  return latch;
}

代码示例来源:origin: apache/metron

public boolean hasIndex(String indexName) {
 Set<String> indices = getClient().admin()
   .indices()
   .stats(new IndicesStatsRequest())
   .actionGet()
   .getIndices()
   .keySet();
 return indices.contains(indexName);
}

代码示例来源:origin: org.elasticsearch/elasticsearch

return channel -> client.admin().indices().stats(indicesStatsRequest, new RestToXContentListener<>(channel));

代码示例来源:origin: javanna/elasticshell

@Override
protected ActionFuture<IndicesStatsResponse> doExecute(IndicesStatsRequest request) {
  return client.admin().indices().stats(request);
}

代码示例来源:origin: harbby/presto-connectors

@Override
  public void processResponse(final ClusterStateResponse clusterStateResponse) {
    IndicesStatsRequest indicesStatsRequest = new IndicesStatsRequest();
    indicesStatsRequest.all();
    client.admin().indices().stats(indicesStatsRequest, new RestResponseListener<IndicesStatsResponse>(channel) {
      @Override
      public RestResponse buildResponse(IndicesStatsResponse indicesStatsResponse) throws Exception {
        return RestTable.buildResponse(buildTable(request, clusterStateResponse, indicesStatsResponse), channel);
      }
    });
  }
});

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Retrieve the latest indices stats, calling the listener when complete
 * @return a latch that can be used to wait for the indices stats to complete if desired
 */
protected CountDownLatch updateIndicesStats(final ActionListener<IndicesStatsResponse> listener) {
  final CountDownLatch latch = new CountDownLatch(1);
  final IndicesStatsRequest indicesStatsRequest = new IndicesStatsRequest();
  indicesStatsRequest.clear();
  indicesStatsRequest.store(true);
  client.admin().indices().stats(indicesStatsRequest, new LatchedActionListener<>(listener, latch));
  return latch;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Retrieve the latest indices stats, calling the listener when complete
 * @return a latch that can be used to wait for the indices stats to complete if desired
 */
protected CountDownLatch updateIndicesStats(final ActionListener<IndicesStatsResponse> listener) {
  final CountDownLatch latch = new CountDownLatch(1);
  final IndicesStatsRequest indicesStatsRequest = new IndicesStatsRequest();
  indicesStatsRequest.clear();
  indicesStatsRequest.store(true);
  client.admin().indices().stats(indicesStatsRequest, new LatchedActionListener<>(listener, latch));
  return latch;
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Retrieve the latest indices stats, calling the listener when complete
 * @return a latch that can be used to wait for the indices stats to complete if desired
 */
protected CountDownLatch updateIndicesStats(final ActionListener<IndicesStatsResponse> listener) {
  final CountDownLatch latch = new CountDownLatch(1);
  final IndicesStatsRequest indicesStatsRequest = new IndicesStatsRequest();
  indicesStatsRequest.clear();
  indicesStatsRequest.store(true);
  client.admin().indices().stats(indicesStatsRequest, new LatchedActionListener<>(listener, latch));
  return latch;
}

代码示例来源:origin: com.floragunn/search-guard-6

IndicesStatsResponse nir = tc.admin().indices().stats(new IndicesStatsRequest()).actionGet();
  sb.append(Strings.toString(nir, true, true));
} catch (Exception e1) {

代码示例来源:origin: harbby/presto-connectors

client.admin().indices().stats(indicesStatsRequest, new RestBuilderListener<IndicesStatsResponse>(channel) {
  @Override
  public RestResponse buildResponse(IndicesStatsResponse response, XContentBuilder builder) throws Exception {

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

return channel -> client.admin().indices().stats(indicesStatsRequest, new RestBuilderListener<IndicesStatsResponse>(channel) {
  @Override
  public RestResponse buildResponse(IndicesStatsResponse response, XContentBuilder builder) throws Exception {

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

return channel -> client.admin().indices().stats(indicesStatsRequest, new RestToXContentListener<>(channel));

代码示例来源:origin: apache/servicemix-bundles

return channel -> client.admin().indices().stats(indicesStatsRequest, new RestToXContentListener<>(channel));

相关文章

微信公众号

最新文章

更多

IndicesAdminClient类方法