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, ExclusiveMemHFileBlock(BlockType blockType, int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader, long prevBlockOffset, ByteBuff buf, boolean fillHeader, int uncompressedSizeWithoutHeader, long prevBlockOffset, ByteBuff buf, boolean fillHeader,
long offset, int nextBlockOnDiskSize, int onDiskDataSizeWithHeader, long offset, int nextBlockOnDiskSize, int onDiskDataSizeWithHeader,
HFileContext fileContext) { HFileContext fileContext, ByteBuffAllocator alloc) {
super(blockType, onDiskSizeWithoutHeader, uncompressedSizeWithoutHeader, prevBlockOffset, buf, super(blockType, onDiskSizeWithoutHeader, uncompressedSizeWithoutHeader, prevBlockOffset, buf,
fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, fillHeader, offset, nextBlockOnDiskSize, onDiskDataSizeWithHeader, fileContext, alloc);
ByteBuffAllocator.HEAP);
} }
@Override @Override

View File

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