Class ExampleRegionObserverWithMetrics
java.lang.Object
org.apache.hadoop.hbase.coprocessor.example.ExampleRegionObserverWithMetrics
- All Implemented Interfaces:
Coprocessor
,RegionCoprocessor
An example coprocessor that collects some metrics to demonstrate the usage of exporting custom
metrics from the coprocessor.
These metrics will be available through the regular Hadoop metrics2 sinks (ganglia, opentsdb, etc) as well as JMX output. You can view a snapshot of the metrics by going to the http web UI of the regionserver page, something like http://myregionserverhost:16030/jmx
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
-
Field Summary
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.void
Called by theCoprocessorEnvironment
during it's own shutdown to stop the coprocessor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
getServices
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionCoprocessor
getBulkLoadObserver, getEndpointObserver
-
Field Details
-
preGetCounter
-
flushCounter
-
filesCompactedCounter
-
costlyOperationTimer
-
observer
-
-
Constructor Details
-
ExampleRegionObserverWithMetrics
public ExampleRegionObserverWithMetrics()
-
-
Method Details
-
getRegionObserver
- Specified by:
getRegionObserver
in interfaceRegionCoprocessor
-
start
Description copied from interface:Coprocessor
Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.- Specified by:
start
in interfaceCoprocessor
- Throws:
IOException
-
stop
Description copied from interface:Coprocessor
Called by theCoprocessorEnvironment
during it's own shutdown to stop the coprocessor.- Specified by:
stop
in interfaceCoprocessor
- Throws:
IOException
-