|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.ipc.HBaseRpcMetrics
public class HBaseRpcMetrics
This class is for maintaining the various RPC statistics and publishing them through the metrics interfaces. This also registers the JMX MBean for RPC.
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)
| Field Summary | |
|---|---|
static java.lang.String |
NAME_DELIM
|
org.apache.hadoop.metrics.util.MetricsRegistry |
registry
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.MetricsTimeVaryingRate |
rpcProcessingTime
|
org.apache.hadoop.metrics.util.MetricsTimeVaryingRate |
rpcQueueTime
|
| Constructor Summary | |
|---|---|
HBaseRpcMetrics(java.lang.String hostName,
java.lang.String port)
|
|
| Method Summary | |
|---|---|
void |
createMetrics(java.lang.Class<?>[] ifaces)
Generate metrics entries for all the methods defined in the list of interfaces. |
void |
createMetrics(java.lang.Class<?>[] ifaces,
boolean prefixWithClass)
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 java.lang.String |
getMetricName(java.lang.Class<?> c,
java.lang.String method)
|
void |
inc(java.lang.String name,
int amt)
|
void |
shutdown()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NAME_DELIM
public final org.apache.hadoop.metrics.util.MetricsRegistry registry
public org.apache.hadoop.metrics.util.MetricsTimeVaryingRate rpcQueueTime
public org.apache.hadoop.metrics.util.MetricsTimeVaryingRate rpcProcessingTime
| Constructor Detail |
|---|
public HBaseRpcMetrics(java.lang.String hostName,
java.lang.String port)
| Method Detail |
|---|
public void inc(java.lang.String name,
int amt)
public void createMetrics(java.lang.Class<?>[] ifaces)
MetricsTimeVaryingRate counter will be created for
each Class.getMethods().getName() entry.
ifaces - Define metrics for all methods in the given classes
public void createMetrics(java.lang.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 static java.lang.String getMetricName(java.lang.Class<?> c,
java.lang.String method)
public void doUpdates(org.apache.hadoop.metrics.MetricsContext context)
doUpdates in interface org.apache.hadoop.metrics.Updatercontext - ctxpublic void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||