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 committed by GitHub
parent f5a566ea1b
commit 152ecad53a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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); int newBufferSize = BrotliCodec.getBufferSize(conf);
if (bufferSize != newBufferSize) { if (bufferSize != newBufferSize) {
bufferSize = newBufferSize; bufferSize = newBufferSize;
this.inBuf = ByteBuffer.allocateDirect(bufferSize); this.inBuf = ByteBuffer.allocate(bufferSize);
this.outBuf = ByteBuffer.allocateDirect(bufferSize); this.outBuf = ByteBuffer.allocate(bufferSize);
} }
} }
reset(); reset();