Class BufferDecompressor
- java.lang.Object
-
- org.apache.flink.runtime.io.network.buffer.BufferDecompressor
-
-
Constructor Summary
Constructors Constructor Description BufferDecompressor(int bufferSize, NettyShuffleEnvironmentOptions.CompressionCodec factoryName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Buffer
decompressToIntermediateBuffer(Buffer buffer)
Decompresses the givenBuffer
usingBlockDecompressor
.Buffer
decompressToOriginalBuffer(Buffer buffer)
The difference between this method anddecompressToIntermediateBuffer(Buffer)
is that this method copies the decompressed data to the inputBuffer
starting from offset 0.
-
-
-
Constructor Detail
-
BufferDecompressor
public BufferDecompressor(int bufferSize, NettyShuffleEnvironmentOptions.CompressionCodec factoryName)
-
-
Method Detail
-
decompressToIntermediateBuffer
public Buffer decompressToIntermediateBuffer(Buffer buffer)
Decompresses the givenBuffer
usingBlockDecompressor
. The decompressed data will be stored in the intermediate buffer of thisBufferDecompressor
and returned to the caller. The caller must guarantee that the returnedBuffer
has been freed when calling the method next time.Notes that the decompression will always start from offset 0 to the size of the input
Buffer
.
-
decompressToOriginalBuffer
@VisibleForTesting public Buffer decompressToOriginalBuffer(Buffer buffer)
The difference between this method anddecompressToIntermediateBuffer(Buffer)
is that this method copies the decompressed data to the inputBuffer
starting from offset 0.The caller must guarantee that the input
Buffer
is writable and there's enough space left.
-
-