HDFS-10718. Prefer direct ByteBuffer in native RS encoder and decoder. Contributed by Sammi Chen
This commit is contained in:
parent
57369a678c
commit
cca6229696
|
@ -50,6 +50,11 @@ public class NativeRSRawDecoder extends AbstractNativeRawDecoder {
|
|||
destroyImpl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preferDirectBuffer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private native void initImpl(int numDataUnits, int numParityUnits);
|
||||
|
||||
private native void decodeImpl(
|
||||
|
|
|
@ -50,6 +50,11 @@ public class NativeRSRawEncoder extends AbstractNativeRawEncoder {
|
|||
destroyImpl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preferDirectBuffer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private native void initImpl(int numDataUnits, int numParityUnits);
|
||||
|
||||
private native void encodeImpl(ByteBuffer[] inputs, int[] inputOffsets,
|
||||
|
|
Loading…
Reference in New Issue