Class FateLegacyJMXMetrics
- java.lang.Object
-
- org.apache.accumulo.master.metrics.fate.FateLegacyJMXMetrics
-
- All Implemented Interfaces:
FateLegacyJMXMetricsMBean
,Metrics
public class FateLegacyJMXMetrics extends Object implements Metrics, FateLegacyJMXMetricsMBean
Basic implementation of fate metrics that publish to JMX when legacy metrics enabled. For logging in addition to JMX, use the hadoop metrics2 implementation. The measurement type and values provided are:- gauge - current count of FATE transactions in progress
- gauge - last zookeeper id that modified FATE root path to provide estimate of fate transaction liveliness
- counter - the number of zookeeper connection errors since process started.
The fate operation estimate is based on zookeeper Stat structure and the property of pzxid. From the zookeeper developer's guide: pzxid is "The zxid of the change that last modified children of this znode." The pzxid should then change each time a FATE transaction is created or deleted - and the zookeeper id (zxid) is expected to continuously increase because the zookeeper id is used by zookeeper for ordering operations.
-
-
Field Summary
-
Fields inherited from interface org.apache.accumulo.server.metrics.Metrics
MASTER_NAME, PREFIX, THRIFT_NAME, TSERVER_NAME
-
-
Constructor Summary
Constructors Constructor Description FateLegacyJMXMetrics(String instanceId, long minimumRefreshDelay)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String name, long time)
long
getCurrentFateOps()
long
getZKConnectionErrorsTotal()
long
getZkFateChildOpsTotal()
boolean
isEnabled()
void
register()
void
snapshot()
Update the metric values from zookeeper after minimumRefreshDelay has expired.
-
-
-
Constructor Detail
-
FateLegacyJMXMetrics
public FateLegacyJMXMetrics(String instanceId, long minimumRefreshDelay)
-
-
Method Detail
-
register
public void register() throws Exception
-
snapshot
public void snapshot()
Update the metric values from zookeeper after minimumRefreshDelay has expired.
-
getCurrentFateOps
public long getCurrentFateOps()
- Specified by:
getCurrentFateOps
in interfaceFateLegacyJMXMetricsMBean
-
getZkFateChildOpsTotal
public long getZkFateChildOpsTotal()
- Specified by:
getZkFateChildOpsTotal
in interfaceFateLegacyJMXMetricsMBean
-
getZKConnectionErrorsTotal
public long getZKConnectionErrorsTotal()
- Specified by:
getZKConnectionErrorsTotal
in interfaceFateLegacyJMXMetricsMBean
-
-