Package org.apache.hadoop.io.erasurecode
Class ECBlock
java.lang.Object
org.apache.hadoop.io.erasurecode.ECBlock
A wrapper of block level data source/output that
ECChunks can be
extracted from. For HDFS, it can be an HDFS block (250MB). Note it only cares
about erasure coding specific logic thus avoids coupling with any HDFS block
details. We can have something like HdfsBlock extend it.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ECBlock
public ECBlock()A default constructor. isParity and isErased are false by default. -
ECBlock
public ECBlock(boolean isParity, boolean isErased) A constructor specifying isParity and isErased.- Parameters:
isParity- is a parity blockisErased- is erased or not
-
-
Method Details
-
setParity
public void setParity(boolean isParity) Set true if it's for a parity block.- Parameters:
isParity- is parity or not
-
setErased
public void setErased(boolean isErased) Set true if the block is missing.- Parameters:
isErased- is erased or not
-
isParity
public boolean isParity()- Returns:
- true if it's parity block, otherwise false
-
isErased
public boolean isErased()- Returns:
- true if it's erased due to erasure, otherwise false
-