java.lang.Object
org.apache.hadoop.ozone.container.common.volume.VolumeIOStats

public class VolumeIOStats extends Object
This class is used to track Volume IO stats for each HDDS Volume.
  • Constructor Details

    • VolumeIOStats

      @Deprecated public VolumeIOStats()
      Deprecated.
    • VolumeIOStats

      public VolumeIOStats(String identifier, String storageDirectory, int[] intervals)
      Parameters:
      identifier - Typically, path to volume root. e.g. /data/hdds
  • Method Details

    • init

      public void init()
    • unregister

      public void unregister()
    • getMetricsSourceName

      public String getMetricsSourceName()
    • incReadBytes

      public void incReadBytes(long bytesRead)
      Increment number of bytes read from the volume.
      Parameters:
      bytesRead -
    • incReadOpCount

      public void incReadOpCount()
      Increment the read operations performed on the volume.
    • incWriteBytes

      public void incWriteBytes(long bytesWritten)
      Increment number of bytes written on to the volume.
      Parameters:
      bytesWritten -
    • incWriteOpCount

      public void incWriteOpCount()
      Increment the write operations performed on the volume.
    • incReadTime

      public void incReadTime(long time)
      Increment the time taken by read operation on the volume.
      Parameters:
      time -
    • incWriteTime

      public void incWriteTime(long time)
      Increment the time taken by write operation on the volume.
      Parameters:
      time -
    • getReadBytes

      public long getReadBytes()
      Returns total number of bytes read from the volume.
      Returns:
      long
    • getWriteBytes

      public long getWriteBytes()
      Returns total number of bytes written to the volume.
      Returns:
      long
    • getReadOpCount

      public long getReadOpCount()
      Returns total number of read operations performed on the volume.
      Returns:
      long
    • getWriteOpCount

      public long getWriteOpCount()
      Returns total number of write operations performed on the volume.
      Returns:
      long
    • getReadTime

      public long getReadTime()
      Returns total read operations time on the volume.
      Returns:
      long
    • getWriteTime

      public long getWriteTime()
      Returns total write operations time on the volume.
      Returns:
      long
    • getStorageDirectory

      @Metric public String getStorageDirectory()