Class MetricsRecordImpl

java.lang.Object
org.apache.hadoop.metrics2.impl.MetricsRecordImpl
All Implemented Interfaces:
MetricsRecord

@VisibleForTesting public class MetricsRecordImpl extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • timestamp

      public long timestamp()
      Description copied from interface: MetricsRecord
      Get the timestamp of the metrics
      Returns:
      the timestamp
    • name

      public String name()
      Returns:
      the metrics record name
    • description

      public String description()
      Returns:
      the description of the metrics record
    • context

      public String context()
      Returns:
      the context name of the metrics record
    • tags

      public List<MetricsTag> tags()
      Description copied from interface: MetricsRecord
      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

      public Iterable<AbstractMetric> metrics()
      Description copied from interface: MetricsRecord
      Get the metrics of the record
      Returns:
      an immutable iterable interface for metrics
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object