当前位置: 首页>>代码示例>>Java>>正文


Java NodesInfoRequestBuilder类代码示例

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

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

示例1: findHttpAddress

import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequestBuilder; //导入依赖的package包/类
public static InetSocketTransportAddress findHttpAddress(Client client) {
    NodesInfoRequestBuilder nodesInfoRequestBuilder = new NodesInfoRequestBuilder(client, NodesInfoAction.INSTANCE);
    nodesInfoRequestBuilder.setHttp(true).setTransport(false);
    NodesInfoResponse response = nodesInfoRequestBuilder.execute().actionGet();
    Object obj = response.iterator().next().getHttp().getAddress().publishAddress();
    if (obj instanceof InetSocketTransportAddress) {
        return (InetSocketTransportAddress) obj;
    }
    return null;
}
 
开发者ID:jprante,项目名称:elasticsearch-xml,代码行数:11,代码来源:XmlPluginTest.java


示例2: prepareNodesInfo

import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequestBuilder; //导入依赖的package包/类
@Override
public NodesInfoRequestBuilder prepareNodesInfo(String... nodesIds) {
    return new NodesInfoRequestBuilder(this, NodesInfoAction.INSTANCE).setNodesIds(nodesIds);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:AbstractClient.java


示例3: getNodeInfo

import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequestBuilder; //导入依赖的package包/类
public NodeInfo getNodeInfo(String nodeId) {
  NodesInfoRequestBuilder builder = client.admin().cluster().prepareNodesInfo(nodeId);
  NodesInfoResponse response = builder.execute().actionGet();
  return response.getNodes()[0];
}
 
开发者ID:DemandCube,项目名称:NeverwinterDP-Commons,代码行数:6,代码来源:ESClient.java


示例4: prepareNodesInfo

import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequestBuilder; //导入依赖的package包/类
/**
 * Nodes info of the cluster.
 */
NodesInfoRequestBuilder prepareNodesInfo(String... nodesIds);
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:ClusterAdminClient.java



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