Class StripedBlockUtil.StripingChunk

java.lang.Object
org.apache.hadoop.hdfs.util.StripedBlockUtil.StripingChunk
Enclosing class:
StripedBlockUtil

public static class StripedBlockUtil.StripingChunk extends Object
Indicates the coverage of an StripedBlockUtil.AlignedStripe on an internal block, and the state of the chunk in the context of the read request.
  • Field Details

    • FETCHED

      public static final int FETCHED
      Chunk has been successfully fetched
      See Also:
    • MISSING

      public static final int MISSING
      Chunk has encountered failed when being fetched
      See Also:
    • PENDING

      public static final int PENDING
      Chunk being fetched (fetching task is in-flight)
      See Also:
    • REQUESTED

      public static final int REQUESTED
      Chunk is requested either by application or for decoding, need to schedule read task
      See Also:
    • ALLZERO

      public static final int ALLZERO
      Internal block is short and has no overlap with chunk. Chunk considered all-zero bytes in codec calculations.
      See Also:
    • state

      public int state
      If a chunk is completely in requested range, the state transition is: REQUESTED (when AlignedStripe created) -> PENDING -> {FETCHED | MISSING} If a chunk is completely outside requested range (including parity chunks), state transition is: null (AlignedStripe created) ->REQUESTED (upon failure) -> PENDING ...
  • Constructor Details

    • StripingChunk

      public StripingChunk()
    • StripingChunk

      public StripingChunk(ByteBuffer buf)
    • StripingChunk

      public StripingChunk(int state)
  • Method Details

    • useByteBuffer

      public boolean useByteBuffer()
    • useChunkBuffer

      public boolean useChunkBuffer()
    • getByteBuffer

      public ByteBuffer getByteBuffer()
    • getChunkBuffer

      public StripedBlockUtil.ChunkByteBuffer getChunkBuffer()