DummyRawEncoder, NativeRSRawEncoder, NativeXORRawEncoder, RSLegacyRawEncoder, RSRawEncoder, XORRawEncoder@Private
public abstract class RawErasureEncoder
extends java.lang.Object
| Constructor | Description |
|---|---|
RawErasureEncoder(ErasureCoderOptions coderOptions) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
allowChangeInputs() |
Allow change into input buffers or not while perform encoding/decoding.
|
boolean |
allowVerboseDump() |
Allow to dump verbose info during encoding/decoding.
|
protected abstract void |
doEncode(org.apache.hadoop.io.erasurecode.rawcoder.ByteArrayEncodingState encodingState) |
Perform the real encoding work using bytes array, supporting offsets
and lengths.
|
protected abstract void |
doEncode(org.apache.hadoop.io.erasurecode.rawcoder.ByteBufferEncodingState encodingState) |
Perform the real encoding work using direct ByteBuffer.
|
void |
encode(byte[][] inputs,
byte[][] outputs) |
Encode with inputs and generates outputs.
|
void |
encode(java.nio.ByteBuffer[] inputs,
java.nio.ByteBuffer[] outputs) |
Encode with inputs and generates outputs.
|
void |
encode(ECChunk[] inputs,
ECChunk[] outputs) |
Encode with inputs and generates outputs.
|
int |
getNumAllUnits() |
|
int |
getNumDataUnits() |
|
int |
getNumParityUnits() |
|
boolean |
preferDirectBuffer() |
Tell if direct buffer is preferred or not.
|
void |
release() |
Should be called when release this coder.
|
public RawErasureEncoder(ErasureCoderOptions coderOptions)
public void encode(java.nio.ByteBuffer[] inputs,
java.nio.ByteBuffer[] outputs)
throws java.io.IOException
inputs - input buffers to read data from. The buffers' remaining will
be 0 after encodingoutputs - output buffers to put the encoded data into, ready to read
after the calljava.io.IOException - if the encoder is closed.protected abstract void doEncode(org.apache.hadoop.io.erasurecode.rawcoder.ByteBufferEncodingState encodingState)
throws java.io.IOException
encodingState - the encoding state.java.io.IOException - raised on errors performing I/O.public void encode(byte[][] inputs,
byte[][] outputs)
throws java.io.IOException
inputs - input buffers to read data fromoutputs - output buffers to put the encoded data into, read to read
after the calljava.io.IOException - raised on errors performing I/O.protected abstract void doEncode(org.apache.hadoop.io.erasurecode.rawcoder.ByteArrayEncodingState encodingState)
throws java.io.IOException
encodingState - the encoding statejava.io.IOException - raised on errors performing I/O.public void encode(ECChunk[] inputs, ECChunk[] outputs) throws java.io.IOException
inputs - input buffers to read data fromoutputs - output buffers to put the encoded data into, read to read
after the calljava.io.IOException - if the encoder is closed.public int getNumDataUnits()
public int getNumParityUnits()
public int getNumAllUnits()
public boolean preferDirectBuffer()
public boolean allowChangeInputs()
public boolean allowVerboseDump()
public void release()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.