me.prettyprint.cassandra.service
Interface CassandraClientMonitorMBean

All Known Implementing Classes:
CassandraClientMonitor

public interface CassandraClientMonitorMBean

Defines the various JMX methods the CassandraClientMonitor exposes.

Author:
Ran Tavory (ran@outbain.com)

Method Summary
 boolean addCassandraHost(String hostStr)
          Add a host in the format of "[hostname]:[port]"
 Set<String> getExhaustedPoolNames()
          List of exhausted pools.
 List<String> getKnownHosts()
           
 int getNumActive()
          Total number of active clients in all client pools
 int getNumBlockedThreads()
          Number of threads that are currently blocked, waiting for a free connection.
 long getNumConnectionErrors()
          How many times did initial connection failed.
 int getNumExhaustedPools()
          Number of exhausted connection pools
 int getNumIdleConnections()
          Total number of idle clients in all client pools
 long getNumPoolExhaustedEventCount()
           
 int getNumPools()
          Number of existing connection pools.
 long getReadFail()
           
 long getRecoverableErrorCount()
          Returns the total number of recoverable errors which is the sum of getRecoverableTimedOutCount, getRecoverableTimedOutCount and getRecoverableTransportExceptionCount
 long getRecoverableLoadBalancedConnectErrors()
           
 long getRecoverableTimedOutCount()
           
 long getRecoverableTransportExceptionCount()
           
 long getRecoverableUnavailableCount()
           
 long getSkipHostSuccess()
           
 List<String> getStatisticsPerPool()
          Retrieves stats per pool.
 Set<String> getSuspendedCassandraHosts()
           
 long getWriteFail()
           
 boolean removeCassandraHost(String hostStr)
          Remove a host in the format of "[hostname]:[port]"
 boolean suspendCassandraHost(String hostStr)
           
 boolean unsuspendCassandraHost(String hostStr)
           
 void updateKnownHosts()
          Tells all pulls to update their list of known hosts.
 

Method Detail

getWriteFail

long getWriteFail()
Returns:
Number of failed (and not-recovered) writes.

getReadFail

long getReadFail()
Returns:
Number of failed (and not recovered) reads.

getRecoverableTimedOutCount

long getRecoverableTimedOutCount()
Returns:
Number of TimedOutException that the client has been able to recover from by failing over to a different host in the ring.

getRecoverableUnavailableCount

long getRecoverableUnavailableCount()
Returns:
Number of UnavailableException that the client has been able to recover from by failing over to a different host in the ring.

getRecoverableTransportExceptionCount

long getRecoverableTransportExceptionCount()
Returns:
Number of TTransportException that the client has been able to recover from by failing over to a different host in the ring.

getRecoverableErrorCount

long getRecoverableErrorCount()
Returns the total number of recoverable errors which is the sum of getRecoverableTimedOutCount, getRecoverableTimedOutCount and getRecoverableTransportExceptionCount

Returns:
the total number of recoverable errors by failing over the other hosts.

getSkipHostSuccess

long getSkipHostSuccess()
Returns:
Number of times a skip-host was performed. Hosts are skipped when there are errors at the current host.

getNumPoolExhaustedEventCount

long getNumPoolExhaustedEventCount()
Returns:
Number of times clients were requested when connection pools were exhausted.

getNumPools

int getNumPools()
Number of existing connection pools. There may be up to one pool per cassandra host.


getNumIdleConnections

int getNumIdleConnections()
Total number of idle clients in all client pools


getNumActive

int getNumActive()
Total number of active clients in all client pools


getNumExhaustedPools

int getNumExhaustedPools()
Number of exhausted connection pools

Returns:

getRecoverableLoadBalancedConnectErrors

long getRecoverableLoadBalancedConnectErrors()

getExhaustedPoolNames

Set<String> getExhaustedPoolNames()
List of exhausted pools.

Returns:

getNumBlockedThreads

int getNumBlockedThreads()
Number of threads that are currently blocked, waiting for a free connection. This number may be greater than 0 only if the ExhaustedPolicy is ExhaustedPolicy.WHEN_EXHAUSTED_BLOCK


getNumConnectionErrors

long getNumConnectionErrors()
How many times did initial connection failed.

Returns:

getKnownHosts

List<String> getKnownHosts()

updateKnownHosts

void updateKnownHosts()
                      throws HectorTransportException
Tells all pulls to update their list of known hosts. This is useful when an admin adds/removes a host from the ring and wants the application to update asap.

Throws:
HectorTransportException

getStatisticsPerPool

List<String> getStatisticsPerPool()
Retrieves stats per pool.


addCassandraHost

boolean addCassandraHost(String hostStr)
Add a host in the format of "[hostname]:[port]"

Parameters:
hostStr -
Returns:

removeCassandraHost

boolean removeCassandraHost(String hostStr)
Remove a host in the format of "[hostname]:[port]"

Parameters:
hostStr -
Returns:
See Also:
CassandraHost#equals(Object)} for how hosts are compared

suspendCassandraHost

boolean suspendCassandraHost(String hostStr)
Parameters:
hostStr -
Returns:
See Also:
#removeCassandraHost(String)} above for semantics of the host string., HConnectionManager#removeCassandraHost(CassandraHost)} for details of this operation.

unsuspendCassandraHost

boolean unsuspendCassandraHost(String hostStr)
Parameters:
hostStr -
Returns:
See Also:
#suspendCassandraHost(String)} above. This is the opposite.

getSuspendedCassandraHosts

Set<String> getSuspendedCassandraHosts()


Copyright © 2011. All Rights Reserved.