MetricsTag (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.metrics2, class: MetricsTag

Package org.apache.hadoop.metrics2

# Class MetricsTag

java.lang.Object
org.apache.hadoop.metrics2.MetricsTag

All Implemented Interfaces:
  `MetricsInfo`

@Public @Evolving public class MetricsTag extends Object implements MetricsInfo
Immutable tag for metrics (for grouping on host/queue/username etc.)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MetricsTag(MetricsInfo info, String value)`
  Construct the tag with name, description and value

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `description()`
  Typically the description corresponds to annotation `Metric.about()` or the name of the class.
  `boolean`
  `equals(Object obj)`
  `int`
  `hashCode()`
  `MetricsInfo`
  `info()`
  `String`
  `name()`
  Typically name corresponds to annotation `Metric.value()` or the name of the class.
  `String`
  `toString()`
  `String`
  `value()`
  Get the value of the tag

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MetricsTag

    public MetricsTag(MetricsInfo info, String value)
    Construct the tag with name, description and value
    Parameters:
      `info` - of the tag
      `value` - of the tag

- ## Method Details

  - ### name

    public String name()
    Description copied from interface: `MetricsInfo`
    Typically name corresponds to annotation `Metric.value()` or the name of the class.
    Specified by:
      `name` in interface `MetricsInfo`
    Returns:
      the name of the metric/tag

  - ### description

    public String description()
    Description copied from interface: `MetricsInfo`
    Typically the description corresponds to annotation `Metric.about()` or the name of the class.
    Specified by:
      `description` in interface `MetricsInfo`
    Returns:
      the description of the metric/tag

  - ### info

    public MetricsInfo info()
    Returns:
      the info object of the tag

  - ### value

    public String value()
    Get the value of the tag
    Returns:
      the value

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