@InterfaceAudience.Private public class MetricsConnection extends Object implements StatisticTrackable
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.Modifier and Type | Class and Description |
---|---|
static class |
MetricsConnection.CallStats
A container class for collecting details about the RPC call as it percolates.
|
protected static class |
MetricsConnection.CallTracker |
protected static class |
MetricsConnection.RegionStats |
protected static class |
MetricsConnection.RunnerStats |
Modifier and Type | Field and Description |
---|---|
protected MetricsConnection.CallTracker |
appendTracker |
static String |
CLIENT_SIDE_METRICS_ENABLED_KEY
Set this key to
true to enable metrics collection of client requests. |
protected com.yammer.metrics.core.Histogram |
concurrentCallsPerServerHist |
protected MetricsConnection.CallTracker |
deleteTracker |
protected MetricsConnection.CallTracker |
getTracker |
protected com.yammer.metrics.core.Counter |
hedgedReadOps |
protected com.yammer.metrics.core.Counter |
hedgedReadWin |
protected MetricsConnection.CallTracker |
incrementTracker |
protected com.yammer.metrics.core.Counter |
metaCacheHits |
protected com.yammer.metrics.core.Counter |
metaCacheMisses |
protected com.yammer.metrics.core.Counter |
metaCacheNumClearRegion |
protected com.yammer.metrics.core.Counter |
metaCacheNumClearServer |
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 and Description |
---|
MetricsConnection(org.apache.hadoop.hbase.client.ConnectionManager.HConnectionImplementation conn) |
Modifier and Type | Method and Description |
---|---|
void |
incrCacheDroppingExceptions(Object exception) |
void |
incrDelayRunners()
Increment the number of delay runner counts.
|
void |
incrHedgedReadOps()
Increment the number of hedged read that have occurred.
|
void |
incrHedgedReadWin()
Increment the number of hedged read returned faster than the original read.
|
void |
incrMetaCacheHit()
Increment the number of meta cache hits.
|
void |
incrMetaCacheMiss()
Increment the number of meta cache misses.
|
void |
incrMetaCacheNumClearRegion()
Increment the number of meta cache drops requested for individual region.
|
void |
incrMetaCacheNumClearServer()
Increment the number of meta cache drops requested for entire RegionServer.
|
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 |
updateRegionStats(ServerName serverName,
byte[] regionName,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionLoadStats stats)
Update stats per region.
|
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) |
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 com.yammer.metrics.core.Counter metaCacheNumClearServer
protected final com.yammer.metrics.core.Counter metaCacheNumClearRegion
protected final com.yammer.metrics.core.Counter hedgedReadOps
protected final com.yammer.metrics.core.Counter hedgedReadWin
protected final com.yammer.metrics.core.Histogram concurrentCallsPerServerHist
protected final ConcurrentMap<String,com.yammer.metrics.core.Timer> rpcTimers
protected final ConcurrentMap<String,com.yammer.metrics.core.Histogram> rpcHistograms
public MetricsConnection(org.apache.hadoop.hbase.client.ConnectionManager.HConnectionImplementation conn)
public void updateServerStats(ServerName serverName, byte[] regionName, Object r)
public void updateRegionStats(ServerName serverName, byte[] regionName, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionLoadStats stats)
StatisticTrackable
updateRegionStats
in interface StatisticTrackable
public void shutdown()
public static MetricsConnection.CallStats newCallStats()
MetricsConnection.CallStats
for clients to attach to RPCs.public void incrMetaCacheHit()
public void incrMetaCacheMiss()
public void incrMetaCacheNumClearServer()
public void incrMetaCacheNumClearRegion()
public void incrHedgedReadOps()
public void incrHedgedReadWin()
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)
public void incrCacheDroppingExceptions(Object exception)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.