org.apache.hadoop.hdfs.util

## Class StripedBlockUtil.BlockReadStats

- java.lang.Object
- - org.apache.hadoop.hdfs.util.StripedBlockUtil.BlockReadStats

- Enclosing class:
    org.apache.hadoop.hdfs.util.StripedBlockUtil

      public static class StripedBlockUtil.BlockReadStats
      extends Object

  Struct holding the read statistics. This is used when reads are done asynchronously, to allow the async threads return the read stats and let the main reading thread to update the stats. This is important for the ThreadLocal stats for the main reading thread to be correct.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlockReadStats(int numBytesRead, boolean shortCircuit, int distance)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBytesRead()`
    `int` | `getNetworkDistance()`
    `boolean` | `isShortCircuit()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### BlockReadStats

          public BlockReadStats(int numBytesRead,
                                boolean shortCircuit,
                                int distance)

  - ### Method Detail

    - #### getBytesRead

          public int getBytesRead()

    - #### isShortCircuit

          public boolean isShortCircuit()

    - #### getNetworkDistance

          public int getNetworkDistance()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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