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 Details

  • 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