|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.MetricsConnection
@InterfaceAudience.Private public class MetricsConnection
This class is for maintaining the various connection statistics and publishing them through
the metrics interfaces.
This class manages its own MetricsRegistry
and JmxReporter
so as to not
conflict with other uses of Yammer Metrics within the client application. Instantiating
this class implicitly creates and "starts" instances of these classes; be sure to call
shutdown()
to terminate the thread pools they allocate.
Nested Class Summary | |
---|---|
static class |
MetricsConnection.CallStats
A container class for collecting details about the RPC call as it percolates. |
protected class |
MetricsConnection.CallTracker
|
protected static class |
MetricsConnection.RegionStats
|
protected static class |
MetricsConnection.RunnerStats
|
Field Summary | |
---|---|
protected MetricsConnection.CallTracker |
appendTracker
|
static String |
CLIENT_SIDE_METRICS_ENABLED_KEY
Set this key to true to enable metrics collection of client requests. |
protected MetricsConnection.CallTracker |
deleteTracker
|
protected MetricsConnection.CallTracker |
getTracker
|
protected MetricsConnection.CallTracker |
incrementTracker
|
protected com.yammer.metrics.core.Counter |
metaCacheHits
|
protected com.yammer.metrics.core.Counter |
metaCacheMisses
|
protected MetricsConnection.CallTracker |
multiTracker
|
protected MetricsConnection.CallTracker |
putTracker
|
protected ConcurrentMap<String,com.yammer.metrics.core.Histogram> |
rpcHistograms
|
protected ConcurrentMap<String,com.yammer.metrics.core.Timer> |
rpcTimers
|
protected MetricsConnection.RunnerStats |
runnerStats
|
protected MetricsConnection.CallTracker |
scanTracker
|
protected ConcurrentHashMap<ServerName,ConcurrentMap<byte[],MetricsConnection.RegionStats>> |
serverStats
|
Constructor Summary | |
---|---|
MetricsConnection(HConnectionManager.HConnectionImplementation conn)
|
Method Summary | |
---|---|
void |
incrDelayRunners()
Increment the number of delay runner counts. |
void |
incrMetaCacheHit()
Increment the number of meta cache hits. |
void |
incrMetaCacheMiss()
Increment the number of meta cache misses. |
void |
incrNormalRunners()
Increment the number of normal runner counts. |
static MetricsConnection.CallStats |
newCallStats()
Produce an instance of MetricsConnection.CallStats for clients to attach to RPCs. |
void |
shutdown()
|
void |
updateDelayInterval(long interval)
Update delay interval of delay runner. |
void |
updateRpc(com.google.protobuf.Descriptors.MethodDescriptor method,
com.google.protobuf.Message param,
MetricsConnection.CallStats stats)
Report RPC context to metrics system. |
void |
updateServerStats(ServerName serverName,
byte[] regionName,
Object r)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CLIENT_SIDE_METRICS_ENABLED_KEY
true
to enable metrics collection of client requests.
protected ConcurrentHashMap<ServerName,ConcurrentMap<byte[],MetricsConnection.RegionStats>> serverStats
protected final com.yammer.metrics.core.Counter metaCacheHits
protected final com.yammer.metrics.core.Counter metaCacheMisses
protected final MetricsConnection.CallTracker getTracker
protected final MetricsConnection.CallTracker scanTracker
protected final MetricsConnection.CallTracker appendTracker
protected final MetricsConnection.CallTracker deleteTracker
protected final MetricsConnection.CallTracker incrementTracker
protected final MetricsConnection.CallTracker putTracker
protected final MetricsConnection.CallTracker multiTracker
protected final MetricsConnection.RunnerStats runnerStats
protected final ConcurrentMap<String,com.yammer.metrics.core.Timer> rpcTimers
protected final ConcurrentMap<String,com.yammer.metrics.core.Histogram> rpcHistograms
Constructor Detail |
---|
public MetricsConnection(HConnectionManager.HConnectionImplementation conn)
Method Detail |
---|
public void updateServerStats(ServerName serverName, byte[] regionName, Object r)
public void shutdown()
public static MetricsConnection.CallStats newCallStats()
MetricsConnection.CallStats
for clients to attach to RPCs.
public void incrMetaCacheHit()
public void incrMetaCacheMiss()
public void incrNormalRunners()
public void incrDelayRunners()
public void updateDelayInterval(long interval)
public void updateRpc(com.google.protobuf.Descriptors.MethodDescriptor method, com.google.protobuf.Message param, MetricsConnection.CallStats stats)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |