ReadStatistics (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs, class: ReadStatistics

Package org.apache.hadoop.hdfs

# Class ReadStatistics

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReadStatistics()`
  `ReadStatistics(ReadStatistics rhs)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addErasureCodingDecodingTime(long millis)`
  `void`
  `addLocalBytes(long amt)`
  `void`
  `addRemoteBytes(long amt)`
  `void`
  `addShortCircuitBytes(long amt)`
  `void`
  `addZeroCopyBytes(long amt)`
  `void`
  `clear()`
  `BlockType`
  `getBlockType()`
  `long`
  `getRemoteBytesRead()`
  `long`
  `getTotalBytesRead()`
  `long`
  `getTotalEcDecodingTimeMillis()`
  Return the total time in milliseconds used for erasure coding decoding.
  `long`
  `getTotalLocalBytesRead()`
  `long`
  `getTotalShortCircuitBytesRead()`
  `long`
  `getTotalZeroCopyBytesRead()`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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