public class HBaseRpcMetrics extends Object implements org.apache.hadoop.metrics.Updater
This class has a number of metrics variables that are publicly accessible; these variables (objects) have methods to update their values; for example:
rpcQueueTime
.inc(time)
Modifier and Type | Field and Description |
---|---|
org.apache.hadoop.metrics.util.MetricsIntValue |
activeRpcCount |
org.apache.hadoop.metrics.util.MetricsTimeVaryingInt |
authenticationFailures |
org.apache.hadoop.metrics.util.MetricsTimeVaryingInt |
authenticationSuccesses |
org.apache.hadoop.metrics.util.MetricsTimeVaryingInt |
authorizationFailures |
org.apache.hadoop.metrics.util.MetricsTimeVaryingInt |
authorizationSuccesses |
org.apache.hadoop.metrics.util.MetricsIntValue |
callQueueLen |
static String |
NAME_DELIM |
org.apache.hadoop.metrics.util.MetricsIntValue |
numOpenConnections |
org.apache.hadoop.metrics.util.MetricsIntValue |
priorityCallQueueLen |
org.apache.hadoop.metrics.util.MetricsTimeVaryingLong |
receivedBytes
The metrics variables are public:
- they can be set directly by calling their set/inc methods
-they can also be read directly - e.g.
|
org.apache.hadoop.metrics.util.MetricsIntValue |
replicationCallQueueLen |
org.apache.hadoop.metrics.util.MetricsTimeVaryingRate |
rpcProcessingTime |
org.apache.hadoop.metrics.util.MetricsTimeVaryingRate |
rpcQueueTime |
org.apache.hadoop.metrics.util.MetricsTimeVaryingRate |
rpcSlowResponseTime |
org.apache.hadoop.metrics.util.MetricsTimeVaryingLong |
sentBytes |
Constructor and Description |
---|
HBaseRpcMetrics(String hostName,
String port) |
Modifier and Type | Method and Description |
---|---|
void |
createMetrics(Class<?>[] ifaces)
Generate metrics entries for all the methods defined in the list of
interfaces.
|
void |
createMetrics(Class<?>[] ifaces,
boolean prefixWithClass)
Generate metrics entries for all the methods defined in the list of
interfaces.
|
void |
createMetrics(Class<?>[] ifaces,
boolean prefixWithClass,
String[] suffixes)
Generate metrics entries for all the methods defined in the list of
interfaces.
|
void |
doUpdates(org.apache.hadoop.metrics.MetricsContext context)
Push the metrics to the monitoring subsystem on doUpdate() call.
|
static String |
getMetricName(Class<?> c,
String method) |
void |
inc(String name,
int amt) |
void |
shutdown() |
public static final String NAME_DELIM
public final org.apache.hadoop.metrics.util.MetricsTimeVaryingLong receivedBytes
public final org.apache.hadoop.metrics.util.MetricsTimeVaryingLong sentBytes
public final org.apache.hadoop.metrics.util.MetricsTimeVaryingRate rpcQueueTime
public org.apache.hadoop.metrics.util.MetricsTimeVaryingRate rpcProcessingTime
public final org.apache.hadoop.metrics.util.MetricsIntValue numOpenConnections
public final org.apache.hadoop.metrics.util.MetricsIntValue callQueueLen
public final org.apache.hadoop.metrics.util.MetricsIntValue priorityCallQueueLen
public final org.apache.hadoop.metrics.util.MetricsTimeVaryingInt authenticationFailures
public final org.apache.hadoop.metrics.util.MetricsTimeVaryingInt authenticationSuccesses
public final org.apache.hadoop.metrics.util.MetricsTimeVaryingInt authorizationFailures
public final org.apache.hadoop.metrics.util.MetricsTimeVaryingInt authorizationSuccesses
public org.apache.hadoop.metrics.util.MetricsTimeVaryingRate rpcSlowResponseTime
public final org.apache.hadoop.metrics.util.MetricsIntValue replicationCallQueueLen
public final org.apache.hadoop.metrics.util.MetricsIntValue activeRpcCount
public void inc(String name, int amt)
public void createMetrics(Class<?>[] ifaces)
MetricsTimeVaryingRate
counter will be created for
each Class.getMethods().getName()
entry.ifaces
- Define metrics for all methods in the given classespublic void createMetrics(Class<?>[] ifaces, boolean prefixWithClass)
MetricsTimeVaryingRate
counter will be created for
each Class.getMethods().getName()
entry.
If prefixWithClass
is true
, each metric will be named as
[Class.getSimpleName()].[Method.getName()]
. Otherwise each metric
will just be named according to the method -- Method.getName()
.
ifaces
- Define metrics for all methods in the given classesprefixWithClass
- If true
, each metric will be named as
"classname.method"public void createMetrics(Class<?>[] ifaces, boolean prefixWithClass, String[] suffixes)
MetricsTimeVaryingRate
counter will be created for
each Class.getMethods().getName()
entry.
If prefixWithClass
is true
, each metric will be named as
[Class.getSimpleName()].[Method.getName()]
. Otherwise each metric
will just be named according to the method -- Method.getName()
.
Additionally, if suffixes
is defined, additional metrics will be
created for each method named as the original metric concatenated with
the suffix.
ifaces
- Define metrics for all methods in the given classesprefixWithClass
- If true
, each metric will be named as
"classname.method"suffixes
- If not null, each method will get additional metrics ending
in each of the suffixes.public void doUpdates(org.apache.hadoop.metrics.MetricsContext context)
doUpdates
in interface org.apache.hadoop.metrics.Updater
public void shutdown()
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.