public ThreadPoolInfo info() { List<Info> infos = new ArrayList<>(); for (ExecutorHolder holder : executors.values()) { String name = holder.info.getName(); // no need to have info on "same" thread pool if ("same".equals(name)) { continue; } infos.add(holder.info); } return new ThreadPoolInfo(infos); }
private long getBulkQueueSize() { NodesInfoResponse response = client.admin().cluster().prepareNodesInfo().setThreadPool(true).get(); for (NodeInfo node : response.getNodes()) { Iterator<Info> iterator = node.getThreadPool().iterator(); while (iterator.hasNext()) { Info info = iterator.next(); if ("bulk".equals(info.getName())) { return info.getQueueSize().getSingles(); } } } return DEFAULT_BULK_QUEUE_SIZE; } private boolean isBulkProcessorAvailable() {
nodeInfo.getThreadPool().toXContent(builder, params);
public static ThreadPoolInfo readThreadPoolInfo(StreamInput in) throws IOException { ThreadPoolInfo info = new ThreadPoolInfo(); info.readFrom(in); return info; }
} else { out.writeBoolean(true); threadPool.writeTo(out);
threadPool = ThreadPoolInfo.readThreadPoolInfo(in);
private Map<String, String> getNodesInfos(NodesInfoResponse nodesInfoResponse) { Map<String, String> nodeInfoMap = new HashMap<>(); for (NodeInfo nodeInfo : nodesInfoResponse.getNodes()) { try (XContentBuilder builder = XContentFactory.jsonBuilder()) { builder.humanReadable(true).prettyPrint(); builder.startObject(); nodeInfo.getSettings().toXContent(builder, ToXContent.EMPTY_PARAMS); nodeInfo.getOs().toXContent(builder, ToXContent.EMPTY_PARAMS); nodeInfo.getProcess().toXContent(builder, ToXContent.EMPTY_PARAMS); nodeInfo.getJvm().toXContent(builder, ToXContent.EMPTY_PARAMS); nodeInfo.getThreadPool().toXContent(builder, ToXContent.EMPTY_PARAMS); nodeInfo.getTransport().toXContent(builder, ToXContent.EMPTY_PARAMS); nodeInfo.getPlugins().toXContent(builder, ToXContent.EMPTY_PARAMS); nodeInfo.getIngest().toXContent(builder, ToXContent.EMPTY_PARAMS); builder.endObject(); nodeInfoMap.put(nodeInfo.getNode().getName(), builder.string()); } catch (IOException e) { Exceptions.handle(e); } } return nodeInfoMap; }
nodeInfo.getThreadPool().toXContent(builder, params);
public ThreadPoolInfo info() { List<Info> infos = new ArrayList<>(); for (ExecutorHolder holder : executors.values()) { String name = holder.info.getName(); // no need to have info on "same" thread pool if ("same".equals(name)) { continue; } infos.add(holder.info); } return new ThreadPoolInfo(infos); }
nodeInfo.getThreadPool().toXContent(builder, params);
public ThreadPoolInfo info() { List<Info> infos = new ArrayList<>(); for (ExecutorHolder holder : executors.values()) { String name = holder.info.getName(); // no need to have info on "same" thread pool if ("same".equals(name)) { continue; } infos.add(holder.info); } return new ThreadPoolInfo(infos); }
nodeInfo.getThreadPool().toXContent(builder, params);
public ThreadPoolInfo info() { List<Info> infos = new ArrayList<>(); for (ExecutorHolder holder : executors.values()) { String name = holder.info.getName(); // no need to have info on "same" thread pool if ("same".equals(name)) { continue; } infos.add(holder.info); } return new ThreadPoolInfo(infos); }
nodeInfo.getThreadPool().toXContent(builder, params);
public ThreadPoolInfo info() { List<Info> infos = new ArrayList<>(); for (ExecutorHolder holder : executors.values()) { String name = holder.info.getName(); // no need to have info on "same" thread pool if ("same".equals(name)) { continue; } infos.add(holder.info); } return new ThreadPoolInfo(infos); }