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

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

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

IndicesAdminClient.prepareStatus介绍

暂无

代码示例

代码示例来源:origin: ujmp/universal-java-matrix-package

@Override
public synchronized int size() {
  IndicesStatusResponse response = client.admin().indices().prepareStatus().execute().actionGet();
  return response.getIndices().size();
}

代码示例来源:origin: com.netflix.raigad/raigad

/**
 * Following method is isolated so that it helps in Unit Testing for Mocking
 * @param esTransportClient
 * @return
 */
public IndicesStatusResponse getIndicesStatusResponse(Client esTransportClient)
{
  return esTransportClient.admin().indices().prepareStatus().execute().actionGet(config.getAutoCreateIndexTimeout());
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Override
public synchronized Matrix get(int index) {
  IndicesStatusResponse response = client.admin().indices().prepareStatus().execute().actionGet();
  Set<String> indexSet = new TreeSet<String>(response.getIndices().keySet());
  List<String> indexList = new ArrayList<String>(indexSet);
  return Matrix.Factory.linkToValue(indexList.get(index));
}

代码示例来源:origin: mallocator/Elasticsearch-HBase-River

private void waitForESReady() {
  if (!this.esClient.admin().indices().prepareExists(this.index).execute().actionGet().exists()) {
    return;
  }
  for (final ShardStatus status : this.esClient.admin().indices().prepareStatus(this.index).execute().actionGet().getShards()) {
    if (status.getState() != IndexShardState.STARTED) {
      try {
        Thread.sleep(1000);
      } catch (InterruptedException e) {
        this.logger.trace("HBase thread has been interrupted while waiting for the database to be reachable");
      }
      this.logger.trace("Waiting...");
      waitForESReady();
      break;
    }
  }
}

相关文章

微信公众号

最新文章

更多

IndicesAdminClient类方法