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; }
for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) { candidates.add(threadPoolStats.getName()); poolThreadInfo = new HashMap<>(); ThreadPoolStats threadPoolStats = stats.getThreadPool(); for (ThreadPoolStats.Stats threadPoolStat : threadPoolStats) { poolThreadStats.put(threadPoolStat.getName(), threadPoolStat);
getJvm().toXContent(builder, params); if (getThreadPool() != null) { getThreadPool().toXContent(builder, params);
final NodesStatsResponse response = client.admin().cluster().prepareNodesStats().setThreadPool(true).execute().actionGet(); final NodeStats[] nodeStats2 = response.getNodes(); for (NodeStats nodeStats3 : nodeStats2) { ThreadPoolStats stats = nodeStats3.getThreadPool(); if (stats != null) for (ThreadPoolStats.Stats threadPoolStat : stats) { System.out.println("node `" + nodeStats3.getNode().getName() + "`" + " has pool `" + threadPoolStat.getName() + "` with current queue size " + threadPoolStat.getQueue()); } }
return; tpstats = ndStat.getThreadPool(); if (tpstats == null) { logger.info("ThreadPoolStats is null,hence returning (No ThreadPoolStats).");
for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) { candidates.add(threadPoolStats.getName()); poolThreadInfo = new HashMap<>(); ThreadPoolStats threadPoolStats = stats.getThreadPool(); for (ThreadPoolStats.Stats threadPoolStat : threadPoolStats) { poolThreadStats.put(threadPoolStat.getName(), threadPoolStat);
for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) { candidates.add(threadPoolStats.getName()); poolThreadInfo = new HashMap<>(); ThreadPoolStats threadPoolStats = stats.getThreadPool(); for (ThreadPoolStats.Stats threadPoolStat : threadPoolStats) { poolThreadStats.put(threadPoolStat.getName(), threadPoolStat);
for (final ThreadPoolStats.Stats threadPoolStats : nodeStats.getThreadPool()) { candidates.add(threadPoolStats.getName()); poolThreadInfo = new HashMap<>(); ThreadPoolStats threadPoolStats = stats.getThreadPool(); for (ThreadPoolStats.Stats threadPoolStat : threadPoolStats) { poolThreadStats.put(threadPoolStat.getName(), threadPoolStat);
private void sendNodeStats() { sendNodeFsStats(nodeStats.getFs()); sendNodeHttpStats(nodeStats.getHttp()); sendNodeJvmStats(nodeStats.getJvm()); sendNodeNetworkStats(nodeStats.getNetwork()); sendNodeOsStats(nodeStats.getOs()); sendNodeProcessStats(nodeStats.getProcess()); sendNodeTransportStats(nodeStats.getTransport()); sendNodeThreadPoolStats(nodeStats.getThreadPool()); }
poolThreadInfo = new HashMap<>(14); ThreadPoolStats threadPoolStats = stats.getThreadPool(); for (ThreadPoolStats.Stats threadPoolStat : threadPoolStats) { poolThreadStats.put(threadPoolStat.getName(), threadPoolStat);
getJvm().toXContent(builder, params); if (getThreadPool() != null) { getThreadPool().toXContent(builder, params);
getJvm().toXContent(builder, params); if (getThreadPool() != null) { getThreadPool().toXContent(builder, params);
getJvm().toXContent(builder, params); if (getThreadPool() != null) { getThreadPool().toXContent(builder, params);
getJvm().toXContent(builder, params); if (getThreadPool() != null) { getThreadPool().toXContent(builder, params);