HBASE-26992 Brotli compressor has unexpected behavior during reinitialization (#4389)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Andrew Purtell 2022-04-30 09:11:33 -07:00
parent afb8afd26c
commit 191e932944
1 changed files with 2 additions and 2 deletions

View File

@ -162,8 +162,8 @@ public class BrotliCompressor implements CanReinit, Compressor {
int newBufferSize = BrotliCodec.getBufferSize(conf);
if (bufferSize != newBufferSize) {
bufferSize = newBufferSize;
this.inBuf = ByteBuffer.allocateDirect(bufferSize);
this.outBuf = ByteBuffer.allocateDirect(bufferSize);
this.inBuf = ByteBuffer.allocate(bufferSize);
this.outBuf = ByteBuffer.allocate(bufferSize);
}
}
reset();