org.apache.hadoop.metrics2
Interface MetricsRecord


@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface MetricsRecord

An immutable snapshot of metrics with a timestamp


Method Summary
 String context()
           
 String description()
           
 Iterable<AbstractMetric> metrics()
          Get the metrics of the record
 String name()
           
 Collection<MetricsTag> tags()
          Get the tags of the record Note: returning a collection instead of iterable as we need to use tags as keys (hence Collection#hashCode etc.) in maps
 long timestamp()
          Get the timestamp of the metrics
 

Method Detail

timestamp

long timestamp()
Get the timestamp of the metrics

Returns:
the timestamp

name

String name()
Returns:
the record name

description

String description()
Returns:
the description of the record

context

String context()
Returns:
the context name of the record

tags

Collection<MetricsTag> tags()
Get the tags of the record Note: returning a collection instead of iterable as we need to use tags as keys (hence Collection#hashCode etc.) in maps

Returns:
an unmodifiable collection of tags

metrics

Iterable<AbstractMetric> metrics()
Get the metrics of the record

Returns:
an immutable iterable interface for metrics


Copyright © 2014 Apache Software Foundation. All Rights Reserved.