org.apache.hadoop.metrics2

## Interface MetricsRecord

-     @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public interface MetricsRecord

  An immutable snapshot of metrics with a timestamp

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 metrics record name

    - #### description

          String description()

      Returns:
        the description of the metrics record

    - #### context

          String context()

      Returns:
        the context name of the metrics 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 © 2022 Apache Software Foundation. All rights reserved.