Class BufferDecompressor
- java.lang.Object
-
- org.apache.flink.runtime.io.network.buffer.BufferDecompressor
-
-
Constructor Summary
Constructors Constructor Description BufferDecompressor(int bufferSize, org.apache.flink.configuration.NettyShuffleEnvironmentOptions.CompressionCodec factoryName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferdecompressToIntermediateBuffer(Buffer buffer)Decompresses the givenBufferusingBlockDecompressor.BufferdecompressToOriginalBuffer(Buffer buffer)The difference between this method anddecompressToIntermediateBuffer(Buffer)is that this method copies the decompressed data to the inputBufferstarting from offset 0.
-
-
-
Method Detail
-
decompressToIntermediateBuffer
public Buffer decompressToIntermediateBuffer(Buffer buffer)
Decompresses the givenBufferusingBlockDecompressor. The decompressed data will be stored in the intermediate buffer of thisBufferDecompressorand returned to the caller. The caller must guarantee that the returnedBufferhas 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 inputBufferstarting from offset 0.The caller must guarantee that the input
Bufferis writable and there's enough space left.
-
-