Package org.apache.cassandra.concurrent

Examples of org.apache.cassandra.concurrent.IExecutorMBean


            query = new ObjectName("org.apache.cassandra.concurrent:type=*");
            Set<ObjectName> result = mbeanServerConn.queryNames(query, null);
            for (ObjectName objectName : result)
            {
                String poolName = objectName.getKeyProperty("type");
                IExecutorMBean threadPoolProxy = JMX.newMBeanProxy(mbeanServerConn, objectName, IExecutorMBean.class);
                outs.print(String.format("%-25s", poolName));
                outs.print(String.format("%10d", threadPoolProxy.getActiveCount()));
                outs.print(String.format("%10d", threadPoolProxy.getPendingTasks()));
                outs.print(String.format("%15d", threadPoolProxy.getCompletedTasks()));
                outs.println();
            }
        }
        catch (MalformedObjectNameException e)
        {
View Full Code Here


    public Map.Entry<String, IExecutorMBean> next()
    {
        ObjectName objectName = resIter.next();
        String poolName = objectName.getKeyProperty("type");
        IExecutorMBean threadPoolProxy = JMX.newMBeanProxy(mbeanServerConn, objectName, IExecutorMBean.class);
        return new AbstractMap.SimpleImmutableEntry<String, IExecutorMBean>(poolName, threadPoolProxy);
    }
View Full Code Here

        Iterator<Map.Entry<String, IExecutorMBean>> threads = probe.getThreadPoolMBeanProxies();
        while (threads.hasNext())
        {
            Entry<String, IExecutorMBean> thread = threads.next();
            String poolName = thread.getKey();
            IExecutorMBean threadPoolProxy = thread.getValue();
            outs.printf("%-25s%10s%10s%15s\n",
                        poolName, threadPoolProxy.getActiveCount(), threadPoolProxy.getPendingTasks(), threadPoolProxy.getCompletedTasks());
        }
    }
View Full Code Here

        Set<ObjectName> requests = server.queryNames(new ObjectName("org.apache.cassandra.request:type=*"), null);
        Set<ObjectName> internal = server.queryNames(new ObjectName("org.apache.cassandra.internal:type=*"), null);
        for (ObjectName objectName : Iterables.concat(requests, internal))
        {
            String poolName = objectName.getKeyProperty("type");
            IExecutorMBean threadPoolProxy = JMX.newMBeanProxy(server, objectName, IExecutorMBean.class);
            logger.info(String.format("%-25s%10s%10s",
                                      poolName, threadPoolProxy.getActiveCount(), threadPoolProxy.getPendingTasks()));
        }
        // one offs
        logger.info(String.format("%-25s%10s%10s",
                                  "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
        int pendingCommands = 0;
View Full Code Here

TOP

Related Classes of org.apache.cassandra.concurrent.IExecutorMBean

Copyright © 2018 www.massapicom. 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.