MetricsRecord (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.metrics2, interface: MetricsRecord

Package org.apache.hadoop.metrics2

# Interface MetricsRecord

@Public @Evolving public interface MetricsRecord
An immutable snapshot of metrics with a timestamp

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### 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