Class ReadStatistics

java.lang.Object
org.apache.hadoop.hdfs.ReadStatistics

public class ReadStatistics extends Object
A utility class that maintains statistics for reading.
  • Constructor Details

    • ReadStatistics

      public ReadStatistics()
    • ReadStatistics

      public ReadStatistics(ReadStatistics rhs)
  • Method Details

    • getTotalBytesRead

      public long getTotalBytesRead()
      Returns:
      The total bytes read. This will always be at least as high as the other numbers, since it includes all of them.
    • getTotalLocalBytesRead

      public long getTotalLocalBytesRead()
      Returns:
      The total local bytes read. This will always be at least as high as totalShortCircuitBytesRead, since all short-circuit reads are also local.
    • getTotalShortCircuitBytesRead

      public long getTotalShortCircuitBytesRead()
      Returns:
      The total short-circuit local bytes read.
    • getTotalZeroCopyBytesRead

      public long getTotalZeroCopyBytesRead()
      Returns:
      The total number of zero-copy bytes read.
    • getRemoteBytesRead

      public long getRemoteBytesRead()
      Returns:
      The total number of bytes read which were not local.
    • getBlockType

      public BlockType getBlockType()
      Returns:
      block type of the input stream. If block type != CONTIGUOUS, it is reading erasure coded data.
    • getTotalEcDecodingTimeMillis

      public long getTotalEcDecodingTimeMillis()
      Return the total time in milliseconds used for erasure coding decoding.
    • addRemoteBytes

      public void addRemoteBytes(long amt)
    • addLocalBytes

      public void addLocalBytes(long amt)
    • addShortCircuitBytes

      public void addShortCircuitBytes(long amt)
    • addZeroCopyBytes

      public void addZeroCopyBytes(long amt)
    • addErasureCodingDecodingTime

      public void addErasureCodingDecodingTime(long millis)
    • clear

      public void clear()