Class OMHAMetrics

java.lang.Object
org.apache.hadoop.ozone.om.ha.OMHAMetrics
All Implemented Interfaces:
org.apache.hadoop.metrics2.MetricsSource

@Metrics(about="OzoneManager HA Metrics", context="ozone") public final class OMHAMetrics extends Object implements org.apache.hadoop.metrics2.MetricsSource
Class to maintain metrics and info related to OM HA.
  • Field Details

    • SOURCE_NAME

      public static final String SOURCE_NAME
  • Method Details

    • create

      public static OMHAMetrics create(String nodeId, String leaderId)
      Create and return OMHAMetrics instance.
      Returns:
      OMHAMetrics
    • unRegister

      public static void unRegister()
      Unregister the metrics instance.
    • getMetrics

      public void getMetrics(org.apache.hadoop.metrics2.MetricsCollector collector, boolean all)
      Specified by:
      getMetrics in interface org.apache.hadoop.metrics2.MetricsSource
    • getOmhaInfoNodeId

      public String getOmhaInfoNodeId()
    • getOmhaInfoOzoneManagerHALeaderState

      public int getOmhaInfoOzoneManagerHALeaderState()