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 and Description
    `ReadStatistics()`
    `ReadStatistics(ReadStatistics rhs)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### ReadStatistics

          public ReadStatistics()

    - #### ReadStatistics

          public ReadStatistics(ReadStatistics rhs)

  - ### Method Detail

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

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.