org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(103)

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

NodesStatsResponse介绍

暂无

代码示例

代码示例来源:origin: SonarSource/sonarqube

private void completeNodeAttributes(ProtobufSystemInfo.Section.Builder protobuf) {
 NodesStatsResponse nodesStats = esClient.prepareNodesStats()
  .setFs(true)
  .setProcess(true)
  .setJvm(true)
  .setIndices(true)
  .setBreaker(true)
  .get();
 if (!nodesStats.getNodes().isEmpty()) {
  NodeStats stats = nodesStats.getNodes().get(0);
  toProtobuf(stats, protobuf);
 }
}

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

@Override
public NodesStatsResponse newResponse() {
  return new NodesStatsResponse();
}

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

@Override
  public String toString() {
    try {
      XContentBuilder builder = XContentFactory.jsonBuilder().prettyPrint();
      builder.startObject();
      toXContent(builder, EMPTY_PARAMS);
      builder.endObject();
      return Strings.toString(builder);
    } catch (IOException e) {
      return "{ \"error\" : \"" + e.getMessage() + "\"}";
    }
  }
}

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

HttpStats httpStats = null;
NodeStats ndStat = null;
if (ndsStatsResponse.getNodes().length > 0) {
  ndStat = ndsStatsResponse.getAt(0);

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

for (final NodeStats nodeStats : nodesStats.getNodes()) {
  for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) {
    candidates.add(threadPoolStats.getName());
  final NodeStats stats = nodesStats.getNodesMap().get(node.getId());

代码示例来源:origin: pinterest/soundwave

public Map<String, NodeStats> getNodesStats() throws Exception {
 NodesStatsResponse nodesStats = esClient.admin().cluster().prepareNodesStats().all().get();
 return nodesStats.getNodesMap();
}

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

NodeIndicesStats nodeIndicesStats = null;
NodeStats ndStat = null;
if (ndsStatsResponse.getNodes().length > 0) {
  ndStat = ndsStatsResponse.getAt(0);

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

for (final NodeStats nodeStats : nodesStats.getNodes()) {
  for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) {
    candidates.add(threadPoolStats.getName());
  final NodeStats stats = nodesStats.getNodesMap().get(node.getId());

代码示例来源:origin: org.graylog.plugins/usage-statistics

private Map<String, NodeStats> fetchNodeStats() {
    ClusterAdminClient adminClient = this.client.admin().cluster();
    NodesStatsResponse nodesStatsResponse = adminClient.nodesStats(adminClient.prepareNodesStats().request()).actionGet();
    return nodesStatsResponse.getNodesMap();
  }
}

代码示例来源:origin: SonarSource/sonarqube

public Collection<NodeInfo> load() {
 NodesStatsResponse nodesStats = esClient.prepareNodesStats()
  .setFs(true)
  .setProcess(true)
  .setJvm(true)
  .setIndices(true)
  .setBreaker(true)
  .get();
 List<NodeInfo> result = new ArrayList<>();
 nodesStats.getNodes().forEach(nodeStat -> result.add(toNodeInfo(nodeStat)));
 return result;
}

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

TransportStats transportStats = null;
NodeStats ndStat = null;
if (ndsStatsResponse.getNodes().length > 0) {
  ndStat = ndsStatsResponse.getAt(0);

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

for (final NodeStats nodeStats : nodesStats.getNodes()) {
  for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) {
    candidates.add(threadPoolStats.getName());
  final NodeStats stats = nodesStats.getNodesMap().get(node.getId());

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

NodeStats stats = nodesStats.getNodesMap().get(node.getId());

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

@Override
protected NodesStatsResponse newResponse(NodesStatsRequest request, List<NodeStats> responses, List<FailedNodeException> failures) {
  return new NodesStatsResponse(clusterService.getClusterName(), responses, failures);
}

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

@Override
  public String toString() {
    try {
      XContentBuilder builder = XContentFactory.jsonBuilder().prettyPrint();
      builder.startObject();
      toXContent(builder, EMPTY_PARAMS);
      builder.endObject();
      return builder.string();
    } catch (IOException e) {
      return "{ \"error\" : \"" + e.getMessage() + "\"}";
    }
  }
}

代码示例来源:origin: richardwilly98/elasticsearch-river-mongodb

private boolean isBulkProcessorAvailable() {
  NodesStatsResponse response = client.admin().cluster().prepareNodesStats().setThreadPool(true).get();
  for (NodeStats nodeStats : response.getNodes()) {
    Iterator<Stats> iterator = nodeStats.getThreadPool().iterator();
    while (iterator.hasNext()) {
      Stats stats = iterator.next();
      if ("bulk".equals(stats.getName())) {
        int queue = stats.getQueue();
        logger.trace("bulkQueueSize [{}] - queue [{}] - availability [{}]", bulkQueueSize, queue, 1 - (queue / bulkQueueSize));
        return 1 - (queue / bulkQueueSize) > 0.1;
      }
    }
  }
  return true;
}

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

AllCircuitBreakerStats allCircuitBreakerStats = null;
 NodeStats ndStat = null;
 if (ndsStatsResponse.getNodes().length > 0) {
   ndStat = ndsStatsResponse.getAt(0);

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

for (final NodeStats nodeStats : nodesStats.getNodes()) {
  for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) {
    candidates.add(threadPoolStats.getName());
  final NodeStats stats = nodesStats.getNodesMap().get(node.getId());

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

NodeStats stats = nodesStats.getNodesMap().get(node.id());
table.startRow();

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

@Override
public NodesStatsResponse newResponse() {
  return new NodesStatsResponse();
}

相关文章

微信公众号

最新文章

更多