HBASE-23374 ExclusiveMemHFileBlock’s allocator should not be hardcoded as ByteBuffAllocator.HEAP

Signed-off-by: stack <stack@apache.org>
Signed-off-by: Jan Hentschel <janh@apache.org>
This commit is contained in:
chenxu14 2019-12-26 04:38:02 +08:00 committed by Jan Hentschel
parent 1b049a2d34
commit 56f9db98d1
2 changed files with 3 additions and 4 deletions

View File

@ -39,10 +39,9 @@ public class ExclusiveMemHFileBlock extends HFileBlock {
ExclusiveMemHFileBlock(BlockType blockType, int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader, long prevBlockOffset, ByteBuff buf, boolean fillHeader,
long offset, int nextBlockOnDiskSize, int onDiskDataSizeWithHeader,
HFileContext fileContext) {
HFileContext fileContext, ByteBuffAllocator alloc) {
super(blockType, onDiskSizeWithoutHeader, uncompressedSizeWithoutHeader, prevBlockOffset, buf,
fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext,
ByteBuffAllocator.HEAP);
fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, alloc);
}
@Override

View File

@ -108,7 +108,7 @@ public class HFileBlockBuilder {
} else {
return new ExclusiveMemHFileBlock(blockType, onDiskSizeWithoutHeader,
uncompressedSizeWithoutHeader, prevBlockOffset, buf, fillHeader, offset,
nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext);
nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, allocator);
}
}
}