@InterfaceAudience.Private public class ExampleRegionObserverWithMetrics extends Object implements RegionCoprocessor
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
ExampleMasterObserverWithMetrics
Modifier and Type | Class and Description |
---|---|
(package private) class |
ExampleRegionObserverWithMetrics.ExampleRegionObserver |
Coprocessor.State
Modifier and Type | Field and Description |
---|---|
private Timer |
costlyOperationTimer |
private Counter |
filesCompactedCounter |
private Counter |
flushCounter |
private ExampleRegionObserverWithMetrics.ExampleRegionObserver |
observer |
private Counter |
preGetCounter |
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Constructor and Description |
---|
ExampleRegionObserverWithMetrics() |
Modifier and Type | Method and Description |
---|---|
Optional<RegionObserver> |
getRegionObserver() |
void |
start(CoprocessorEnvironment env)
Called by the
CoprocessorEnvironment during it's own startup to initialize the
coprocessor. |
void |
stop(CoprocessorEnvironment e)
Called by the
CoprocessorEnvironment during it's own shutdown to stop the
coprocessor. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBulkLoadObserver, getEndpointObserver
getServices
private Counter preGetCounter
private Counter flushCounter
private Counter filesCompactedCounter
private Timer costlyOperationTimer
private ExampleRegionObserverWithMetrics.ExampleRegionObserver observer
public ExampleRegionObserverWithMetrics()
public Optional<RegionObserver> getRegionObserver()
getRegionObserver
in interface RegionCoprocessor
public void start(CoprocessorEnvironment env) throws IOException
Coprocessor
CoprocessorEnvironment
during it's own startup to initialize the
coprocessor.start
in interface Coprocessor
IOException
public void stop(CoprocessorEnvironment e) throws IOException
Coprocessor
CoprocessorEnvironment
during it's own shutdown to stop the
coprocessor.stop
in interface Coprocessor
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.