Example usage for org.apache.hadoop.metrics2 MetricsSource getMetrics

List of usage examples for org.apache.hadoop.metrics2 MetricsSource getMetrics

Introduction

In this page you can find the example usage for org.apache.hadoop.metrics2 MetricsSource getMetrics.

Prototype

void getMetrics(MetricsCollector collector, boolean all);

Source Link

Document

Get metrics from the metrics source

Usage

From source file:com.alibaba.wasp.fserver.metrics.MetricsAssertHelperImpl.java

License:Apache License

private void getMetrics(BaseSource source) {
    reset();/*from  ww  w  .  j  a  v a2 s.c  o  m*/
    if (!(source instanceof MetricsSource)) {
        assertTrue("The Source passed must be a MetricsSource", false);
    }
    MetricsSource impl = (MetricsSource) source;

    impl.getMetrics(new MockMetricsBuilder(), true);

}