Search in sources :

Example 1 with MetricsJsonBuilder

use of org.apache.hadoop.metrics2.MetricsJsonBuilder in project hadoop by apache.

the class DataNodePeerMetrics method dumpSendPacketDownstreamAvgInfoAsJson.

/**
   * Dump SendPacketDownstreamRollingAvgTime metrics as JSON.
   */
public String dumpSendPacketDownstreamAvgInfoAsJson() {
    final MetricsJsonBuilder builder = new MetricsJsonBuilder(null);
    sendPacketDownstreamRollingAvgerages.snapshot(builder, true);
    return builder.toString();
}
Also used : MetricsJsonBuilder(org.apache.hadoop.metrics2.MetricsJsonBuilder)

Aggregations

MetricsJsonBuilder (org.apache.hadoop.metrics2.MetricsJsonBuilder)1