• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java IndicesStatusResponse类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.elasticsearch.action.admin.indices.status.IndicesStatusResponse的典型用法代码示例。如果您正苦于以下问题:Java IndicesStatusResponse类的具体用法?Java IndicesStatusResponse怎么用?Java IndicesStatusResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IndicesStatusResponse类属于org.elasticsearch.action.admin.indices.status包,在下文中一共展示了IndicesStatusResponse类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: get

import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; //导入依赖的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));
}
 
开发者ID:ujmp,项目名称:universal-java-matrix-package,代码行数:8,代码来源:ElasticsearchIndexListMatrix.java


示例2: getIndexStatus

import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; //导入依赖的package包/类
public IndexStatus[] getIndexStatus() {
  String[] indices = this.getClusterState().metaData().getConcreteAllIndices();
  IndicesStatusRequestBuilder builder = client.admin().indices().prepareStatus(indices);
  IndicesStatusResponse response = builder.execute().actionGet();
  Map<String, IndexStatus> map = response.getIndices();
  return map.values().toArray(new IndexStatus[map.size()]);
}
 
开发者ID:DemandCube,项目名称:NeverwinterDP-Commons,代码行数:8,代码来源:ESClient.java


示例3: run

import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; //导入依赖的package包/类
@Override
public void run() {
    log.info("I am going to do some clean up for index window: " + window);
    final IndicesStatusResponse indicesStatusResponse = client.admin()
            .indices().prepareStatus().execute().actionGet();
    final Set<String> allIndices = indicesStatusResponse.getIndices()
            .keySet();
    final Set<String> toBeRemoved = getToBeRemovedIndices(allIndices);
    if (toBeRemoved.isEmpty()) {
        log.info("All good... no index to be removed.");
        return;
    }
    for (final String index : toBeRemoved) {
        log.info("This index is going to be removed: " + index);
        try {
            final DeleteIndexResponse deleteResponse = client.admin()
                    .indices().delete(new DeleteIndexRequest(index))
                    .actionGet();
            if (deleteResponse.isAcknowledged()) {
                log.info("Delete successful for: " + index);
            } else {
                log.info("Delete not successful for: " + index);
            }
        } catch (final Exception e) {
            log.error("Something went wrong while deleting index " + index,
                    e);
        }
    }
}
 
开发者ID:spotify,项目名称:elasticsearch-index-window,代码行数:30,代码来源:IndexWindowRunner.java


示例4: clearIndices

import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; //导入依赖的package包/类
public static void clearIndices(Client esClient) {
    IndicesStatusRequest req = Requests.indicesStatusRequest((String[]) null);
    IndicesStatusResponse statuses = indicesAdmin(esClient).status(req).actionGet();
    for (String index : statuses.getIndices().keySet()) {
        indicesAdmin(esClient).delete(Requests.deleteIndexRequest(index)).actionGet();
    }
}
 
开发者ID:atlasapi,项目名称:atlas-deer,代码行数:8,代码来源:ElasticSearchHelper.java


示例5: toXContent

import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; //导入依赖的package包/类
@Override
protected XContentBuilder toXContent(IndicesStatusRequest request, IndicesStatusResponse response, XContentBuilder builder) throws IOException {
    builder.startObject();
    builder.field(Fields.OK, true);
    buildBroadcastShardsHeader(builder, response);
    response.toXContent(builder, ToXContent.EMPTY_PARAMS);
    builder.endObject();
    return builder;
}
 
开发者ID:javanna,项目名称:elasticshell,代码行数:10,代码来源:StatusRequestBuilder.java


示例6: size

import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; //导入依赖的package包/类
@Override
public synchronized int size() {
	IndicesStatusResponse response = client.admin().indices().prepareStatus().execute().actionGet();
	return response.getIndices().size();
}
 
开发者ID:ujmp,项目名称:universal-java-matrix-package,代码行数:6,代码来源:ElasticsearchIndexListMatrix.java


示例7: doExecute

import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; //导入依赖的package包/类
@Override
protected ActionFuture<IndicesStatusResponse> doExecute(IndicesStatusRequest request) {
    return client.admin().indices().status(request);
}
 
开发者ID:javanna,项目名称:elasticshell,代码行数:5,代码来源:StatusRequestBuilder.java



注:本文中的org.elasticsearch.action.admin.indices.status.IndicesStatusResponse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ReadRepairMetrics类代码示例发布时间:2022-05-22
下一篇:
Java JSON类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap