Package org.apache.hadoop.hdfs.util
Class StripedBlockUtil.StripingChunk
java.lang.Object
org.apache.hadoop.hdfs.util.StripedBlockUtil.StripingChunk
- Enclosing class:
- StripedBlockUtil
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intInternal block is short and has no overlap with chunk.static final intChunk has been successfully fetchedstatic final intChunk has encountered failed when being fetchedstatic final intChunk being fetched (fetching task is in-flight)static final intChunk is requested either by application or for decoding, need to schedule read taskintIf 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanboolean
-
Field Details
-
FETCHED
public static final int FETCHEDChunk has been successfully fetched- See Also:
-
MISSING
public static final int MISSINGChunk has encountered failed when being fetched- See Also:
-
PENDING
public static final int PENDINGChunk being fetched (fetching task is in-flight)- See Also:
-
REQUESTED
public static final int REQUESTEDChunk is requested either by application or for decoding, need to schedule read task- See Also:
-
ALLZERO
public static final int ALLZEROInternal block is short and has no overlap with chunk. Chunk considered all-zero bytes in codec calculations.- See Also:
-
state
public int stateIf 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
-
StripingChunk
public StripingChunk(int state)
-
-
Method Details
-
useByteBuffer
public boolean useByteBuffer() -
useChunkBuffer
public boolean useChunkBuffer() -
getByteBuffer
-
getChunkBuffer
-