Package org.apache.zookeeper.server
Class ZooKeeperServerBean
- java.lang.Object
-
- org.apache.zookeeper.server.ZooKeeperServerBean
-
- All Implemented Interfaces:
ZKMBeanInfo
,ZooKeeperServerMXBean
- Direct Known Subclasses:
FollowerBean
,LeaderBean
,ObserverBean
,ReadOnlyBean
public class ZooKeeperServerBean extends Object implements ZooKeeperServerMXBean, ZKMBeanInfo
This class implements the ZooKeeper server MBean interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected ZooKeeperServer
zks
-
Constructor Summary
Constructors Constructor Description ZooKeeperServerBean(ZooKeeperServer zks)
-
Method Summary
-
-
-
Field Detail
-
zks
protected final ZooKeeperServer zks
-
-
Constructor Detail
-
ZooKeeperServerBean
public ZooKeeperServerBean(ZooKeeperServer zks)
-
-
Method Detail
-
getClientPort
public String getClientPort()
- Specified by:
getClientPort
in interfaceZooKeeperServerMXBean
- Returns:
- the server socket port number
-
getName
public String getName()
- Specified by:
getName
in interfaceZKMBeanInfo
- Returns:
- a string identifying the MBean
-
isHidden
public boolean isHidden()
Description copied from interface:ZKMBeanInfo
If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools. Used for grouping MBeans.- Specified by:
isHidden
in interfaceZKMBeanInfo
- Returns:
- true if the MBean is hidden.
-
getStartTime
public String getStartTime()
- Specified by:
getStartTime
in interfaceZooKeeperServerMXBean
- Returns:
- time the server was started
-
getVersion
public String getVersion()
- Specified by:
getVersion
in interfaceZooKeeperServerMXBean
- Returns:
- the zookeeper server version
-
getAvgRequestLatency
public double getAvgRequestLatency()
- Specified by:
getAvgRequestLatency
in interfaceZooKeeperServerMXBean
- Returns:
- average request latency in ms
-
getMaxRequestLatency
public long getMaxRequestLatency()
- Specified by:
getMaxRequestLatency
in interfaceZooKeeperServerMXBean
- Returns:
- max request latency in ms
-
getMinRequestLatency
public long getMinRequestLatency()
- Specified by:
getMinRequestLatency
in interfaceZooKeeperServerMXBean
- Returns:
- min request latency in ms
-
getOutstandingRequests
public long getOutstandingRequests()
- Specified by:
getOutstandingRequests
in interfaceZooKeeperServerMXBean
- Returns:
- number of outstanding requests.
-
getTickTime
public int getTickTime()
Description copied from interface:ZooKeeperServerMXBean
Current TickTime of server in milliseconds- Specified by:
getTickTime
in interfaceZooKeeperServerMXBean
-
setTickTime
public void setTickTime(int tickTime)
Description copied from interface:ZooKeeperServerMXBean
Set TickTime of server in milliseconds- Specified by:
setTickTime
in interfaceZooKeeperServerMXBean
-
getMaxClientCnxnsPerHost
public int getMaxClientCnxnsPerHost()
Description copied from interface:ZooKeeperServerMXBean
Current maxClientCnxns allowed from a particular host- Specified by:
getMaxClientCnxnsPerHost
in interfaceZooKeeperServerMXBean
-
setMaxClientCnxnsPerHost
public void setMaxClientCnxnsPerHost(int max)
Description copied from interface:ZooKeeperServerMXBean
Set maxClientCnxns allowed from a particular host- Specified by:
setMaxClientCnxnsPerHost
in interfaceZooKeeperServerMXBean
-
getMinSessionTimeout
public int getMinSessionTimeout()
Description copied from interface:ZooKeeperServerMXBean
Current minSessionTimeout of the server in milliseconds- Specified by:
getMinSessionTimeout
in interfaceZooKeeperServerMXBean
-
setMinSessionTimeout
public void setMinSessionTimeout(int min)
Description copied from interface:ZooKeeperServerMXBean
Set minSessionTimeout of server in milliseconds- Specified by:
setMinSessionTimeout
in interfaceZooKeeperServerMXBean
-
getMaxSessionTimeout
public int getMaxSessionTimeout()
Description copied from interface:ZooKeeperServerMXBean
Current maxSessionTimeout of the server in milliseconds- Specified by:
getMaxSessionTimeout
in interfaceZooKeeperServerMXBean
-
setMaxSessionTimeout
public void setMaxSessionTimeout(int max)
Description copied from interface:ZooKeeperServerMXBean
Set maxSessionTimeout of server in milliseconds- Specified by:
setMaxSessionTimeout
in interfaceZooKeeperServerMXBean
-
getDataDirSize
public long getDataDirSize()
- Specified by:
getDataDirSize
in interfaceZooKeeperServerMXBean
- Returns:
- estimated size of data directory in bytes
-
getLogDirSize
public long getLogDirSize()
- Specified by:
getLogDirSize
in interfaceZooKeeperServerMXBean
- Returns:
- estimated size of log directory in bytes
-
getPacketsReceived
public long getPacketsReceived()
- Specified by:
getPacketsReceived
in interfaceZooKeeperServerMXBean
- Returns:
- number of packets received so far
-
getPacketsSent
public long getPacketsSent()
- Specified by:
getPacketsSent
in interfaceZooKeeperServerMXBean
- Returns:
- number of packets sent so far
-
getFsyncThresholdExceedCount
public long getFsyncThresholdExceedCount()
- Specified by:
getFsyncThresholdExceedCount
in interfaceZooKeeperServerMXBean
- Returns:
- number of fsync threshold exceeds so far
-
getAuthFailedCount
public long getAuthFailedCount()
- Specified by:
getAuthFailedCount
in interfaceZooKeeperServerMXBean
- Returns:
- number of AuthFailedCount so far
-
getNonMTLSRemoteConnCount
public long getNonMTLSRemoteConnCount()
- Specified by:
getNonMTLSRemoteConnCount
in interfaceZooKeeperServerMXBean
- Returns:
- number of NonMTLSRemoteConnCount so far
-
getNonMTLSLocalConnCount
public long getNonMTLSLocalConnCount()
- Specified by:
getNonMTLSLocalConnCount
in interfaceZooKeeperServerMXBean
- Returns:
- number of NonMTLSLocalConnCount so far
-
resetLatency
public void resetLatency()
Description copied from interface:ZooKeeperServerMXBean
Reset min/avg/max latency statistics- Specified by:
resetLatency
in interfaceZooKeeperServerMXBean
-
resetMaxLatency
public void resetMaxLatency()
Description copied from interface:ZooKeeperServerMXBean
Reset max latency statistics only.- Specified by:
resetMaxLatency
in interfaceZooKeeperServerMXBean
-
resetFsyncThresholdExceedCount
public void resetFsyncThresholdExceedCount()
Description copied from interface:ZooKeeperServerMXBean
Reset Fsync Threshold Exceed Count statistics only.- Specified by:
resetFsyncThresholdExceedCount
in interfaceZooKeeperServerMXBean
-
resetAuthFailedCount
public void resetAuthFailedCount()
Description copied from interface:ZooKeeperServerMXBean
Reset AuthFailedCount statistics only.- Specified by:
resetAuthFailedCount
in interfaceZooKeeperServerMXBean
-
resetNonMTLSConnCount
public void resetNonMTLSConnCount()
Description copied from interface:ZooKeeperServerMXBean
Reset NonMTLS(Local+Remote)ConnCount statistics only.- Specified by:
resetNonMTLSConnCount
in interfaceZooKeeperServerMXBean
-
resetStatistics
public void resetStatistics()
Description copied from interface:ZooKeeperServerMXBean
Reset packet and latency statistics- Specified by:
resetStatistics
in interfaceZooKeeperServerMXBean
-
getNumAliveConnections
public long getNumAliveConnections()
- Specified by:
getNumAliveConnections
in interfaceZooKeeperServerMXBean
- Returns:
- number of alive client connections
-
getSecureClientPort
public String getSecureClientPort()
- Specified by:
getSecureClientPort
in interfaceZooKeeperServerMXBean
- Returns:
- secure client port
-
getSecureClientAddress
public String getSecureClientAddress()
- Specified by:
getSecureClientAddress
in interfaceZooKeeperServerMXBean
- Returns:
- secure client address
-
getTxnLogElapsedSyncTime
public long getTxnLogElapsedSyncTime()
Description copied from interface:ZooKeeperServerMXBean
Returns the elapsed sync of time of transaction log in milliseconds.- Specified by:
getTxnLogElapsedSyncTime
in interfaceZooKeeperServerMXBean
-
getJuteMaxBufferSize
public int getJuteMaxBufferSize()
- Specified by:
getJuteMaxBufferSize
in interfaceZooKeeperServerMXBean
- Returns:
- Returns the value of the following config setting: jute.maxbuffer
-
getLastClientResponseSize
public int getLastClientResponseSize()
- Specified by:
getLastClientResponseSize
in interfaceZooKeeperServerMXBean
- Returns:
- size of latest generated client response
-
getMinClientResponseSize
public int getMinClientResponseSize()
- Specified by:
getMinClientResponseSize
in interfaceZooKeeperServerMXBean
- Returns:
- size of smallest generated client response
-
getMaxClientResponseSize
public int getMaxClientResponseSize()
- Specified by:
getMaxClientResponseSize
in interfaceZooKeeperServerMXBean
- Returns:
- size of largest generated client response
-
getResponseCachingEnabled
public boolean getResponseCachingEnabled()
- Specified by:
getResponseCachingEnabled
in interfaceZooKeeperServerMXBean
-
setResponseCachingEnabled
public void setResponseCachingEnabled(boolean isEnabled)
- Specified by:
setResponseCachingEnabled
in interfaceZooKeeperServerMXBean
-
getConnectionMaxTokens
public int getConnectionMaxTokens()
- Specified by:
getConnectionMaxTokens
in interfaceZooKeeperServerMXBean
-
setConnectionMaxTokens
public void setConnectionMaxTokens(int val)
- Specified by:
setConnectionMaxTokens
in interfaceZooKeeperServerMXBean
-
getConnectionTokenFillTime
public int getConnectionTokenFillTime()
- Specified by:
getConnectionTokenFillTime
in interfaceZooKeeperServerMXBean
-
setConnectionTokenFillTime
public void setConnectionTokenFillTime(int val)
- Specified by:
setConnectionTokenFillTime
in interfaceZooKeeperServerMXBean
-
getConnectionTokenFillCount
public int getConnectionTokenFillCount()
- Specified by:
getConnectionTokenFillCount
in interfaceZooKeeperServerMXBean
-
setConnectionTokenFillCount
public void setConnectionTokenFillCount(int val)
- Specified by:
setConnectionTokenFillCount
in interfaceZooKeeperServerMXBean
-
getConnectionFreezeTime
public int getConnectionFreezeTime()
- Specified by:
getConnectionFreezeTime
in interfaceZooKeeperServerMXBean
-
setConnectionFreezeTime
public void setConnectionFreezeTime(int val)
- Specified by:
setConnectionFreezeTime
in interfaceZooKeeperServerMXBean
-
getConnectionDropIncrease
public double getConnectionDropIncrease()
- Specified by:
getConnectionDropIncrease
in interfaceZooKeeperServerMXBean
-
setConnectionDropIncrease
public void setConnectionDropIncrease(double val)
- Specified by:
setConnectionDropIncrease
in interfaceZooKeeperServerMXBean
-
getConnectionDropDecrease
public double getConnectionDropDecrease()
- Specified by:
getConnectionDropDecrease
in interfaceZooKeeperServerMXBean
-
setConnectionDropDecrease
public void setConnectionDropDecrease(double val)
- Specified by:
setConnectionDropDecrease
in interfaceZooKeeperServerMXBean
-
getConnectionDecreaseRatio
public double getConnectionDecreaseRatio()
- Specified by:
getConnectionDecreaseRatio
in interfaceZooKeeperServerMXBean
-
setConnectionDecreaseRatio
public void setConnectionDecreaseRatio(double val)
- Specified by:
setConnectionDecreaseRatio
in interfaceZooKeeperServerMXBean
-
getCommitProcMaxReadBatchSize
public int getCommitProcMaxReadBatchSize()
- Specified by:
getCommitProcMaxReadBatchSize
in interfaceZooKeeperServerMXBean
-
setCommitProcMaxReadBatchSize
public void setCommitProcMaxReadBatchSize(int size)
- Specified by:
setCommitProcMaxReadBatchSize
in interfaceZooKeeperServerMXBean
-
getCommitProcMaxCommitBatchSize
public int getCommitProcMaxCommitBatchSize()
- Specified by:
getCommitProcMaxCommitBatchSize
in interfaceZooKeeperServerMXBean
-
setCommitProcMaxCommitBatchSize
public void setCommitProcMaxCommitBatchSize(int size)
- Specified by:
setCommitProcMaxCommitBatchSize
in interfaceZooKeeperServerMXBean
-
getFlushDelay
public long getFlushDelay()
- Specified by:
getFlushDelay
in interfaceZooKeeperServerMXBean
-
setFlushDelay
public void setFlushDelay(long delay)
- Specified by:
setFlushDelay
in interfaceZooKeeperServerMXBean
-
getThrottledOpWaitTime
public int getThrottledOpWaitTime()
- Specified by:
getThrottledOpWaitTime
in interfaceZooKeeperServerMXBean
-
setThrottledOpWaitTime
public void setThrottledOpWaitTime(int val)
- Specified by:
setThrottledOpWaitTime
in interfaceZooKeeperServerMXBean
-
getRequestThrottleLimit
public int getRequestThrottleLimit()
- Specified by:
getRequestThrottleLimit
in interfaceZooKeeperServerMXBean
-
setRequestThrottleLimit
public void setRequestThrottleLimit(int requests)
- Specified by:
setRequestThrottleLimit
in interfaceZooKeeperServerMXBean
-
getRequestThrottleStallTime
public int getRequestThrottleStallTime()
- Specified by:
getRequestThrottleStallTime
in interfaceZooKeeperServerMXBean
-
setRequestThrottleStallTime
public void setRequestThrottleStallTime(int time)
- Specified by:
setRequestThrottleStallTime
in interfaceZooKeeperServerMXBean
-
getRequestThrottleDropStale
public boolean getRequestThrottleDropStale()
- Specified by:
getRequestThrottleDropStale
in interfaceZooKeeperServerMXBean
-
setRequestThrottleDropStale
public void setRequestThrottleDropStale(boolean drop)
- Specified by:
setRequestThrottleDropStale
in interfaceZooKeeperServerMXBean
-
getMaxWriteQueuePollTime
public long getMaxWriteQueuePollTime()
- Specified by:
getMaxWriteQueuePollTime
in interfaceZooKeeperServerMXBean
-
setMaxWriteQueuePollTime
public void setMaxWriteQueuePollTime(long delay)
- Specified by:
setMaxWriteQueuePollTime
in interfaceZooKeeperServerMXBean
-
getRequestStaleLatencyCheck
public boolean getRequestStaleLatencyCheck()
- Specified by:
getRequestStaleLatencyCheck
in interfaceZooKeeperServerMXBean
-
setRequestStaleLatencyCheck
public void setRequestStaleLatencyCheck(boolean check)
- Specified by:
setRequestStaleLatencyCheck
in interfaceZooKeeperServerMXBean
-
getMaxBatchSize
public int getMaxBatchSize()
- Specified by:
getMaxBatchSize
in interfaceZooKeeperServerMXBean
-
setMaxBatchSize
public void setMaxBatchSize(int size)
- Specified by:
setMaxBatchSize
in interfaceZooKeeperServerMXBean
-
getRequestStaleConnectionCheck
public boolean getRequestStaleConnectionCheck()
- Specified by:
getRequestStaleConnectionCheck
in interfaceZooKeeperServerMXBean
-
setRequestStaleConnectionCheck
public void setRequestStaleConnectionCheck(boolean check)
- Specified by:
setRequestStaleConnectionCheck
in interfaceZooKeeperServerMXBean
-
getLargeRequestMaxBytes
public int getLargeRequestMaxBytes()
- Specified by:
getLargeRequestMaxBytes
in interfaceZooKeeperServerMXBean
-
setLargeRequestMaxBytes
public void setLargeRequestMaxBytes(int bytes)
- Specified by:
setLargeRequestMaxBytes
in interfaceZooKeeperServerMXBean
-
getLargeRequestThreshold
public int getLargeRequestThreshold()
- Specified by:
getLargeRequestThreshold
in interfaceZooKeeperServerMXBean
-
setLargeRequestThreshold
public void setLargeRequestThreshold(int threshold)
- Specified by:
setLargeRequestThreshold
in interfaceZooKeeperServerMXBean
-
getMaxCnxns
public int getMaxCnxns()
- Specified by:
getMaxCnxns
in interfaceZooKeeperServerMXBean
- Returns:
- Current maxCnxns allowed to a single ZooKeeper server
-
-