Examples of NodeStats


Examples of com.basho.riak.client.query.NodeStats

   
    /* (non-Javadoc)
     * @see com.basho.riak.client.raw.RawClient#fetchIndex(com.basho.riak.client.raw.RawClient#stats()
     */
    public NodeStats stats() throws IOException {
        NodeStats nodeStats = null;
        for(RawClient rc : cluster) {
            if (nodeStats == null)
                nodeStats = rc.stats();
            else
                nodeStats.add(rc.stats());
        }
        return nodeStats;
    }
View Full Code Here

Examples of com.basho.riak.client.query.NodeStats

   
    /* (non-Javadoc)
     * @see com.basho.riak.client.raw.RawClient#fetchIndex(com.basho.riak.client.raw.RawClient#stats()
     */
    public NodeStats stats() throws IOException {
        NodeStats nodeStats = null;
        for(RawClient rc : cluster) {
            if (nodeStats == null)
                nodeStats = rc.stats();
            else
                nodeStats.add(rc.stats());
        }
        return nodeStats;
    }
View Full Code Here

Examples of com.basho.riak.client.query.NodeStats

   
    /* (non-Javadoc)
     * @see com.basho.riak.client.raw.RawClient#fetchIndex(com.basho.riak.client.raw.RawClient#stats()
     */
    public NodeStats stats() throws IOException {
        NodeStats nodeStats = null;
        for(RawClient rc : cluster) {
            if (nodeStats == null)
                nodeStats = rc.stats();
            else
                nodeStats.add(rc.stats());
        }
        return nodeStats;
    }
View Full Code Here

Examples of freenet.node.NodeStats

    node.nodeStats.drawNewLoadManagementDelayTimes(content);
  }

  private void drawRejectReasonsBox(HTMLNode nextTableCell, boolean local) {
    HTMLNode rejectReasonsTable = new HTMLNode("table");
    NodeStats stats = node.nodeStats;
    boolean success = local ? stats.getLocalRejectReasonsTable(rejectReasonsTable) :
      stats.getRejectReasonsTable(rejectReasonsTable);
    if(!success)
      return;
    HTMLNode rejectReasonsInfobox = nextTableCell.addChild("div", "class", "infobox");
    rejectReasonsInfobox.addChild("div", "class", "infobox-header", (local ? "Local " : "")+"Preemptive Rejection Reasons");
    rejectReasonsInfobox.addChild("div", "class", "infobox-content").addChild(rejectReasonsTable);
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.node.stats.NodeStats

            when(mem.freePercent()).thenReturn((short) 78);

            bind(OsService.class).toInstance(osService);

            NodeService nodeService = mock(NodeService.class);
            NodeStats nodeStats = mock(NodeStats.class);
            when(nodeService.stats()).thenReturn(nodeStats);
            when(nodeStats.getHostname()).thenReturn("localhost");

            DiscoveryNode node = mock(DiscoveryNode.class);
            when(nodeStats.getNode()).thenReturn(node);

            when(nodeStats.getOs()).thenReturn(osStats);
            when(osStats.uptime()).thenReturn(new TimeValue(3600000));
            OsStats.Cpu cpu = mock(OsStats.Cpu.class);
            when(osStats.cpu()).thenReturn(cpu);
            when(cpu.sys()).thenReturn((short) 2);
            when(cpu.user()).thenReturn((short) 4);
            when(cpu.idle()).thenReturn((short) 94);
            when(cpu.stolen()).thenReturn((short) 10);

            ProcessStats processStats = mock(ProcessStats.class);
            when(nodeStats.getProcess()).thenReturn(processStats);
            when(processStats.getOpenFileDescriptors()).thenReturn(42L);

            NodeInfo nodeInfo = mock(NodeInfo.class);
            when(nodeService.info()).thenReturn(nodeInfo);
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.node.stats.NodeStats

        DiscoveryNodes nodes = state.getState().nodes();
        Table table = getTableWithHeader(req);

        for (DiscoveryNode node : nodes) {
            NodeInfo info = nodesInfo.getNodesMap().get(node.id());
            NodeStats stats = nodesStats.getNodesMap().get(node.id());
            table.startRow();

            table.addCell(fullId ? node.id() : Strings.substring(node.getId(), 0, 4));
            table.addCell(info == null ? null : info.getProcess().id());
            table.addCell(node.getHostName());
            table.addCell(node.getHostAddress());
            if (node.address() instanceof InetSocketTransportAddress) {
                table.addCell(((InetSocketTransportAddress) node.address()).address().getPort());
            } else {
                table.addCell("-");
            }

            final Map<String, ThreadPoolStats.Stats> poolThreadStats;
            final Map<String, ThreadPool.Info> poolThreadInfo;

            if (stats == null) {
                poolThreadStats = Collections.emptyMap();
                poolThreadInfo = Collections.emptyMap();
            } else {
                poolThreadStats = new HashMap<>(14);
                poolThreadInfo = new HashMap<>(14);

                ThreadPoolStats threadPoolStats = stats.getThreadPool();
                for (ThreadPoolStats.Stats threadPoolStat : threadPoolStats) {
                    poolThreadStats.put(threadPoolStat.getName(), threadPoolStat);
                }
                if (info != null) {
                    for (ThreadPool.Info threadPoolInfo : info.getThreadPool()) {
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.node.stats.NodeStats

        String masterId = nodes.masterNodeId();
        Table table = getTableWithHeader(req);

        for (DiscoveryNode node : nodes) {
            NodeInfo info = nodesInfo.getNodesMap().get(node.id());
            NodeStats stats = nodesStats.getNodesMap().get(node.id());

            table.startRow();

            table.addCell(fullId ? node.id() : Strings.substring(node.getId(), 0, 4));
            table.addCell(info == null ? null : info.getProcess().id());
            table.addCell(node.getHostName());
            table.addCell(node.getHostAddress());
            if (node.address() instanceof InetSocketTransportAddress) {
                table.addCell(((InetSocketTransportAddress) node.address()).address().getPort());
            } else {
                table.addCell("-");
            }

            table.addCell(node.getVersion().number());
            table.addCell(info == null ? null : info.getBuild().hashShort());
            table.addCell(info == null ? null : info.getJvm().version());
            table.addCell(stats == null ? null : stats.getFs() == null ? null : stats.getFs().total().getAvailable());
            table.addCell(stats == null ? null : stats.getJvm().getMem().getHeapUsed());
            table.addCell(stats == null ? null : stats.getJvm().getMem().getHeapUsedPrecent());
            table.addCell(info == null ? null : info.getJvm().getMem().getHeapMax());
            table.addCell(stats == null ? null : stats.getOs().mem() == null ? null : stats.getOs().mem().used());
            table.addCell(stats == null ? null : stats.getOs().mem() == null ? null : stats.getOs().mem().usedPercent());
            table.addCell(info == null ? null : info.getOs().mem() == null ? null : info.getOs().mem().total()); // sigar fails to load in IntelliJ
            table.addCell(stats == null ? null : stats.getProcess().getOpenFileDescriptors());
            table.addCell(stats == null || info == null ? null :
                          calculatePercentage(stats.getProcess().getOpenFileDescriptors(), info.getProcess().getMaxFileDescriptors()));
            table.addCell(info == null ? null : info.getProcess().getMaxFileDescriptors());

            table.addCell(stats == null ? null : stats.getOs() == null ? null : stats.getOs().getLoadAverage().length < 1 ? null : String.format(Locale.ROOT, "%.2f", stats.getOs().getLoadAverage()[0]));
            table.addCell(stats == null ? null : stats.getJvm().uptime());
            table.addCell(node.clientNode() ? "c" : node.dataNode() ? "d" : "-");
            table.addCell(masterId == null ? "x" : masterId.equals(node.id()) ? "*" : node.masterNode() ? "m" : "-");
            table.addCell(node.name());

            table.addCell(stats == null ? null : stats.getIndices().getCompletion().getSize());

            table.addCell(stats == null ? null : stats.getIndices().getFieldData().getMemorySize());
            table.addCell(stats == null ? null : stats.getIndices().getFieldData().getEvictions());

            table.addCell(stats == null ? null : stats.getIndices().getFilterCache().getMemorySize());
            table.addCell(stats == null ? null : stats.getIndices().getFilterCache().getEvictions());

            table.addCell(stats == null ? null : stats.getIndices().getQueryCache().getMemorySize());
            table.addCell(stats == null ? null : stats.getIndices().getQueryCache().getEvictions());
            table.addCell(stats == null ? null : stats.getIndices().getQueryCache().getHitCount());
            table.addCell(stats == null ? null : stats.getIndices().getQueryCache().getMissCount());

            table.addCell(stats == null ? null : stats.getIndices().getFlush().getTotal());
            table.addCell(stats == null ? null : stats.getIndices().getFlush().getTotalTime());

            table.addCell(stats == null ? null : stats.getIndices().getGet().current());
            table.addCell(stats == null ? null : stats.getIndices().getGet().getTime());
            table.addCell(stats == null ? null : stats.getIndices().getGet().getCount());
            table.addCell(stats == null ? null : stats.getIndices().getGet().getExistsTime());
            table.addCell(stats == null ? null : stats.getIndices().getGet().getExistsCount());
            table.addCell(stats == null ? null : stats.getIndices().getGet().getMissingTime());
            table.addCell(stats == null ? null : stats.getIndices().getGet().getMissingCount());

            table.addCell(stats == null ? null : stats.getIndices().getIdCache().getMemorySize());

            table.addCell(stats == null ? null : stats.getIndices().getIndexing().getTotal().getDeleteCurrent());
            table.addCell(stats == null ? null : stats.getIndices().getIndexing().getTotal().getDeleteTime());
            table.addCell(stats == null ? null : stats.getIndices().getIndexing().getTotal().getDeleteCount());
            table.addCell(stats == null ? null : stats.getIndices().getIndexing().getTotal().getIndexCurrent());
            table.addCell(stats == null ? null : stats.getIndices().getIndexing().getTotal().getIndexTime());
            table.addCell(stats == null ? null : stats.getIndices().getIndexing().getTotal().getIndexCount());

            table.addCell(stats == null ? null : stats.getIndices().getMerge().getCurrent());
            table.addCell(stats == null ? null : stats.getIndices().getMerge().getCurrentNumDocs());
            table.addCell(stats == null ? null : stats.getIndices().getMerge().getCurrentSize());
            table.addCell(stats == null ? null : stats.getIndices().getMerge().getTotal());
            table.addCell(stats == null ? null : stats.getIndices().getMerge().getTotalNumDocs());
            table.addCell(stats == null ? null : stats.getIndices().getMerge().getTotalSize());
            table.addCell(stats == null ? null : stats.getIndices().getMerge().getTotalTime());

            table.addCell(stats == null ? null : stats.getIndices().getPercolate().getCurrent());
            table.addCell(stats == null ? null : stats.getIndices().getPercolate().getMemorySize());
            table.addCell(stats == null ? null : stats.getIndices().getPercolate().getNumQueries());
            table.addCell(stats == null ? null : stats.getIndices().getPercolate().getTime());
            table.addCell(stats == null ? null : stats.getIndices().getPercolate().getCount());

            table.addCell(stats == null ? null : stats.getIndices().getRefresh().getTotal());
            table.addCell(stats == null ? null : stats.getIndices().getRefresh().getTotalTime());

            table.addCell(stats == null ? null : stats.getIndices().getSearch().getTotal().getFetchCurrent());
            table.addCell(stats == null ? null : stats.getIndices().getSearch().getTotal().getFetchTime());
            table.addCell(stats == null ? null : stats.getIndices().getSearch().getTotal().getFetchCount());
            table.addCell(stats == null ? null : stats.getIndices().getSearch().getOpenContexts());
            table.addCell(stats == null ? null : stats.getIndices().getSearch().getTotal().getQueryCurrent());
            table.addCell(stats == null ? null : stats.getIndices().getSearch().getTotal().getQueryTime());
            table.addCell(stats == null ? null : stats.getIndices().getSearch().getTotal().getQueryCount());

            table.addCell(stats == null ? null : stats.getIndices().getSegments().getCount());
            table.addCell(stats == null ? null : stats.getIndices().getSegments().getMemory());
            table.addCell(stats == null ? null : stats.getIndices().getSegments().getIndexWriterMemory());
            table.addCell(stats == null ? null : stats.getIndices().getSegments().getIndexWriterMaxMemory());
            table.addCell(stats == null ? null : stats.getIndices().getSegments().getVersionMapMemory());
            table.addCell(stats == null ? null : stats.getIndices().getSegments().getBitsetMemory());

            table.addCell(stats == null ? null : stats.getIndices().getSuggest().getCurrent());
            table.addCell(stats == null ? null : stats.getIndices().getSuggest().getTime());
            table.addCell(stats == null ? null : stats.getIndices().getSuggest().getCount());

            table.endRow();
        }

        return table;
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.node.stats.NodeStats

    }

    public NodeStats stats() {
        // for indices stats we want to include previous allocated shards stats as well (it will
        // only be applied to the sensible ones to use, like refresh/merge/flush/indexing stats)
        return new NodeStats(discovery.localNode(), System.currentTimeMillis(),
                indicesService.stats(true),
                monitorService.osService().stats(),
                monitorService.processService().stats(),
                monitorService.jvmService().stats(),
                threadPool.stats(),
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.node.stats.NodeStats

    public NodeStats stats(CommonStatsFlags indices, boolean os, boolean process, boolean jvm, boolean threadPool, boolean network,
                           boolean fs, boolean transport, boolean http, boolean circuitBreaker) {
        // for indices stats we want to include previous allocated shards stats as well (it will
        // only be applied to the sensible ones to use, like refresh/merge/flush/indexing stats)
        return new NodeStats(discovery.localNode(), System.currentTimeMillis(),
                indices.anySet() ? indicesService.stats(true, indices) : null,
                os ? monitorService.osService().stats() : null,
                process ? monitorService.processService().stats() : null,
                jvm ? monitorService.jvmService().stats() : null,
                threadPool ? this.threadPool.stats() : null,
View Full Code Here

Examples of org.elasticsearch.action.admin.cluster.node.stats.NodeStats

        FsStats.Info[] infos = new FsStats.Info[1];
        FsStats.Info info = new FsStats.Info("/path.data", null, null,
                usage.getTotalBytes(), usage.getFreeBytes(), usage.getFreeBytes(), -1, -1, -1, -1, -1, -1);
        infos[0] = info;
        FsStats fsStats = new FsStats(System.currentTimeMillis(), infos);
        return new NodeStats(new DiscoveryNode(nodeName, null, Version.V_2_0_0),
                System.currentTimeMillis(),
                null, null, null, null, null, null,
                fsStats,
                null, null, null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.