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

Package org.apache.hadoop.hdfs.util

# Class StripedBlockUtil.AlignedStripe

java.lang.Object
org.apache.hadoop.hdfs.util.StripedBlockUtil.AlignedStripe

Enclosing class:
  StripedBlockUtil

public static class StripedBlockUtil.AlignedStripe extends Object
Given a requested byte range on a striped block group, an AlignedStripe represents an inclusive `StripedBlockUtil.VerticalRange` that is aligned with both the byte range and boundaries of all internal blocks. As illustrated in the diagram, any given byte range on a block group leads to 1~5 AlignedStripe's. An AlignedStripe is the basic unit of reading from a striped block group, because within the AlignedStripe, all internal blocks can be processed in a uniform manner. The coverage of an AlignedStripe on an internal block is represented as a `StripedBlockUtil.StripingChunk`. To simplify the logic of reading a logical byte range from a block group, a StripingChunk is either completely in the requested byte range or completely outside the requested byte range.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final StripedBlockUtil.StripingChunk[]`
  `chunks`
  status of each chunk in the stripe.
  `int`
  `fetchedChunksNum`
  `int`
  `missingChunksNum`
  `StripedBlockUtil.VerticalRange`
  `range`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AlignedStripe(long offsetInBlock, long length, int width)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getOffsetInBlock()`
  `long`
  `getSpanInBlock()`
  `boolean`
  `include(long pos)`
  `String`
  `toString()`

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

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

- ## Field Details

  - ### range

    public StripedBlockUtil.VerticalRange range

  - ### chunks

    public final StripedBlockUtil.StripingChunk[] chunks
    status of each chunk in the stripe.

  - ### fetchedChunksNum

    public int fetchedChunksNum

  - ### missingChunksNum

    public int missingChunksNum

- ## Constructor Details

  - ### AlignedStripe

    public AlignedStripe(long offsetInBlock, long length, int width)

- ## Method Details

  - ### include

    public boolean include(long pos)

  - ### getOffsetInBlock

    public long getOffsetInBlock()

  - ### getSpanInBlock

    public long getSpanInBlock()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`