Search in sources :

Example 1 with ECBlock

use of org.apache.hadoop.io.erasurecode.ECBlock in project hadoop by apache.

the class RSErasureDecoder method prepareDecodingStep.

@Override
protected ErasureCodingStep prepareDecodingStep(final ECBlockGroup blockGroup) {
    ECBlock[] inputBlocks = getInputBlocks(blockGroup);
    ECBlock[] outputBlocks = getOutputBlocks(blockGroup);
    RawErasureDecoder rawDecoder = checkCreateRSRawDecoder();
    return new ErasureDecodingStep(inputBlocks, getErasedIndexes(inputBlocks), outputBlocks, rawDecoder);
}
Also used : RawErasureDecoder(org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder) ECBlock(org.apache.hadoop.io.erasurecode.ECBlock)

Example 2 with ECBlock

use of org.apache.hadoop.io.erasurecode.ECBlock in project hadoop by apache.

the class XORErasureDecoder method prepareDecodingStep.

@Override
protected ErasureCodingStep prepareDecodingStep(final ECBlockGroup blockGroup) {
    RawErasureDecoder rawDecoder = CodecUtil.createRawDecoder(getConf(), ErasureCodeConstants.XOR_CODEC_NAME, getOptions());
    ECBlock[] inputBlocks = getInputBlocks(blockGroup);
    return new ErasureDecodingStep(inputBlocks, getErasedIndexes(inputBlocks), getOutputBlocks(blockGroup), rawDecoder);
}
Also used : RawErasureDecoder(org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder) ECBlock(org.apache.hadoop.io.erasurecode.ECBlock)

Example 3 with ECBlock

use of org.apache.hadoop.io.erasurecode.ECBlock in project hadoop by apache.

the class DummyErasureDecoder method prepareDecodingStep.

@Override
protected ErasureCodingStep prepareDecodingStep(ECBlockGroup blockGroup) {
    RawErasureDecoder rawDecoder = new DummyRawDecoder(getOptions());
    ECBlock[] inputBlocks = getInputBlocks(blockGroup);
    return new ErasureDecodingStep(inputBlocks, getErasedIndexes(inputBlocks), getOutputBlocks(blockGroup), rawDecoder);
}
Also used : RawErasureDecoder(org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder) DummyRawDecoder(org.apache.hadoop.io.erasurecode.rawcoder.DummyRawDecoder) ECBlock(org.apache.hadoop.io.erasurecode.ECBlock)

Example 4 with ECBlock

use of org.apache.hadoop.io.erasurecode.ECBlock in project hadoop by apache.

the class DummyErasureEncoder method prepareEncodingStep.

@Override
protected ErasureCodingStep prepareEncodingStep(ECBlockGroup blockGroup) {
    RawErasureEncoder rawEncoder = new DummyRawEncoder(getOptions());
    ECBlock[] inputBlocks = getInputBlocks(blockGroup);
    return new ErasureEncodingStep(inputBlocks, getOutputBlocks(blockGroup), rawEncoder);
}
Also used : RawErasureEncoder(org.apache.hadoop.io.erasurecode.rawcoder.RawErasureEncoder) ECBlock(org.apache.hadoop.io.erasurecode.ECBlock) DummyRawEncoder(org.apache.hadoop.io.erasurecode.rawcoder.DummyRawEncoder)

Example 5 with ECBlock

use of org.apache.hadoop.io.erasurecode.ECBlock in project hadoop by apache.

the class HHXORErasureDecoder method prepareDecodingStep.

@Override
protected ErasureCodingStep prepareDecodingStep(final ECBlockGroup blockGroup) {
    RawErasureDecoder rawDecoder;
    RawErasureEncoder rawEncoder;
    ECBlock[] inputBlocks = getInputBlocks(blockGroup);
    ECBlock[] outputBlocks = getOutputBlocks(blockGroup);
    rawDecoder = checkCreateRSRawDecoder();
    rawEncoder = checkCreateXorRawEncoder();
    return new HHXORErasureDecodingStep(inputBlocks, getErasedIndexes(inputBlocks), outputBlocks, rawDecoder, rawEncoder);
}
Also used : RawErasureDecoder(org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder) RawErasureEncoder(org.apache.hadoop.io.erasurecode.rawcoder.RawErasureEncoder) ECBlock(org.apache.hadoop.io.erasurecode.ECBlock)

Aggregations

ECBlock (org.apache.hadoop.io.erasurecode.ECBlock)8 RawErasureEncoder (org.apache.hadoop.io.erasurecode.rawcoder.RawErasureEncoder)5 RawErasureDecoder (org.apache.hadoop.io.erasurecode.rawcoder.RawErasureDecoder)4 DummyRawDecoder (org.apache.hadoop.io.erasurecode.rawcoder.DummyRawDecoder)1 DummyRawEncoder (org.apache.hadoop.io.erasurecode.rawcoder.DummyRawEncoder)1