public class CassandraClientMonitor extends Object implements CassandraClientMonitorMBean
| Modifier and Type | Class and Description |
|---|---|
static class |
CassandraClientMonitor.Counter
List of available JMX counts
|
| Constructor and Description |
|---|
CassandraClientMonitor(HConnectionManager connectionManager) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
int |
getNumRenewedIdleConnections()
Total number of connections created due to previous idle connections.
|
int |
getNumRenewedTooLongConnections()
Total number of connections created due to previous too long connections.
|
long |
getReadFail() |
long |
getReadSuccess() |
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() |
long |
getWriteSuccess() |
void |
incCounter(CassandraClientMonitor.Counter counterType) |
boolean |
removeCassandraHost(String hostStr)
Remove a host in the format of "[hostname]:[port]"
|
boolean |
setCassandraHostRetryDelay(String retryDelay) |
boolean |
suspendCassandraHost(String hostStr) |
boolean |
unsuspendCassandraHost(String hostStr) |
void |
updateKnownHosts()
Tells all pulls to update their list of known hosts.
|
public CassandraClientMonitor(HConnectionManager connectionManager)
public void incCounter(CassandraClientMonitor.Counter counterType)
public long getWriteSuccess()
public long getReadFail()
getReadFail in interface CassandraClientMonitorMBeanpublic long getReadSuccess()
public long getSkipHostSuccess()
getSkipHostSuccess in interface CassandraClientMonitorMBeanpublic long getRecoverableTimedOutCount()
getRecoverableTimedOutCount in interface CassandraClientMonitorMBeanTimedOutException that the client has been able to recover from by
failing over to a different host in the ring.public long getRecoverableUnavailableCount()
getRecoverableUnavailableCount in interface CassandraClientMonitorMBeanUnavailableException that the client has been able to recover from by
failing over to a different host in the ring.public long getWriteFail()
getWriteFail in interface CassandraClientMonitorMBeanpublic void updateKnownHosts()
throws HectorTransportException
CassandraClientMonitorMBeanupdateKnownHosts in interface CassandraClientMonitorMBeanHectorTransportExceptionpublic long getNumPoolExhaustedEventCount()
getNumPoolExhaustedEventCount in interface CassandraClientMonitorMBeanpublic Set<String> getExhaustedPoolNames()
CassandraClientMonitorMBeangetExhaustedPoolNames in interface CassandraClientMonitorMBeanpublic int getNumActive()
CassandraClientMonitorMBeangetNumActive in interface CassandraClientMonitorMBeanpublic int getNumBlockedThreads()
CassandraClientMonitorMBeangetNumBlockedThreads in interface CassandraClientMonitorMBeanpublic int getNumExhaustedPools()
CassandraClientMonitorMBeangetNumExhaustedPools in interface CassandraClientMonitorMBeanpublic int getNumIdleConnections()
CassandraClientMonitorMBeangetNumIdleConnections in interface CassandraClientMonitorMBeanpublic int getNumPools()
CassandraClientMonitorMBeangetNumPools in interface CassandraClientMonitorMBeanpublic List<String> getKnownHosts()
getKnownHosts in interface CassandraClientMonitorMBeanpublic List<String> getStatisticsPerPool()
CassandraClientMonitorMBeangetStatisticsPerPool in interface CassandraClientMonitorMBeanpublic long getRecoverableTransportExceptionCount()
getRecoverableTransportExceptionCount in interface CassandraClientMonitorMBeanTTransportException that the client has been able to recover from by
failing over to a different host in the ring.public long getRecoverableErrorCount()
CassandraClientMonitorMBeangetRecoverableErrorCount in interface CassandraClientMonitorMBeanpublic long getRecoverableLoadBalancedConnectErrors()
getRecoverableLoadBalancedConnectErrors in interface CassandraClientMonitorMBeanpublic long getNumConnectionErrors()
CassandraClientMonitorMBeangetNumConnectionErrors in interface CassandraClientMonitorMBeanpublic boolean addCassandraHost(String hostStr)
CassandraClientMonitorMBeanaddCassandraHost in interface CassandraClientMonitorMBeanpublic boolean removeCassandraHost(String hostStr)
CassandraClientMonitorMBeanremoveCassandraHost in interface CassandraClientMonitorMBeanCassandraHost#equals(Object)} for how hosts are comparedpublic Set<String> getSuspendedCassandraHosts()
getSuspendedCassandraHosts in interface CassandraClientMonitorMBeanpublic boolean suspendCassandraHost(String hostStr)
suspendCassandraHost in interface CassandraClientMonitorMBean#removeCassandraHost(String)} above for semantics of the host string.,
HConnectionManager#removeCassandraHost(CassandraHost)} for details of this operation.public boolean unsuspendCassandraHost(String hostStr)
unsuspendCassandraHost in interface CassandraClientMonitorMBean#suspendCassandraHost(String)} above. This is the opposite.public boolean setCassandraHostRetryDelay(String retryDelay)
setCassandraHostRetryDelay in interface CassandraClientMonitorMBeanpublic int getNumRenewedIdleConnections()
CassandraClientMonitorMBeangetNumRenewedIdleConnections in interface CassandraClientMonitorMBeanpublic int getNumRenewedTooLongConnections()
CassandraClientMonitorMBeangetNumRenewedTooLongConnections in interface CassandraClientMonitorMBeanCopyright © 2014. All Rights Reserved.