@InterfaceAudience.Private class CellBlockBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
CellBlockBuilder.ByteBufferOutputStreamSupplier |
private static class |
CellBlockBuilder.ByteBufOutputStreamSupplier |
private static interface |
CellBlockBuilder.OutputStreamSupplier |
| Modifier and Type | Field and Description |
|---|---|
private int |
cellBlockBuildingInitialBufferSize |
private int |
cellBlockDecompressionMultiplier
How much we think the decompressor will expand the original compressed content.
|
private org.apache.hadoop.conf.Configuration |
conf |
(package private) static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
CellBlockBuilder(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
buildCellBlock(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
CellScanner cellScanner)
Puts CellScanner Cells into a cell block using passed in
codec and/or
compressor. |
org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf |
buildCellBlock(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
CellScanner cellScanner,
org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator alloc) |
private boolean |
buildCellBlock(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
CellScanner cellScanner,
CellBlockBuilder.OutputStreamSupplier supplier) |
ByteBufferListOutputStream |
buildCellBlockStream(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
CellScanner cellScanner,
ByteBufferPool pool)
Puts CellScanner Cells into a cell block using passed in
codec and/or
compressor. |
CellScanner |
createCellScanner(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
byte[] cellBlock) |
CellScanner |
createCellScannerReusingBuffers(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
ByteBuff cellBlock) |
private ByteBuffer |
decompress(org.apache.hadoop.io.compress.CompressionCodec compressor,
byte[] compressedCellBlock) |
private ByteBuff |
decompress(org.apache.hadoop.io.compress.CompressionCodec compressor,
ByteBuff compressedCellBlock) |
private ByteBuffer |
decompress(org.apache.hadoop.io.compress.CompressionCodec compressor,
InputStream cellBlockStream,
int osInitialSize) |
private void |
encodeCellsTo(OutputStream os,
CellScanner cellScanner,
Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor) |
static final org.slf4j.Logger LOG
private final org.apache.hadoop.conf.Configuration conf
private final int cellBlockDecompressionMultiplier
private final int cellBlockBuildingInitialBufferSize
public CellBlockBuilder(org.apache.hadoop.conf.Configuration conf)
public ByteBuffer buildCellBlock(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, CellScanner cellScanner) throws IOException
codec and/or
compressor.codec - compressor - cellScanner - codec and/or compressor; the returned buffer has
been flipped and is ready for reading. Use limit to find total size.IOExceptionpublic org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf buildCellBlock(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, CellScanner cellScanner, org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator alloc) throws IOException
IOExceptionprivate boolean buildCellBlock(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, CellScanner cellScanner, CellBlockBuilder.OutputStreamSupplier supplier) throws IOException
IOExceptionprivate void encodeCellsTo(OutputStream os, CellScanner cellScanner, Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor) throws IOException
IOExceptionpublic ByteBufferListOutputStream buildCellBlockStream(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, CellScanner cellScanner, ByteBufferPool pool) throws IOException
codec and/or
compressor.codec - to use for encodingcompressor - to use for encodingcellScanner - to encodepool - Pool of ByteBuffers to make use of.codec and/or compressor; the returned buffer has
been flipped and is ready for reading. Use limit to find total size. If
pool was not null, then this returned ByteBuffer came from there and
should be returned to the pool when done.IOException - if encoding the cells failpublic CellScanner createCellScanner(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, byte[] cellBlock) throws IOException
codec - to use for cellblockcellBlock - to encodecellBlockIOException - if encoding failspublic CellScanner createCellScannerReusingBuffers(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, ByteBuff cellBlock) throws IOException
codec - to use for cellblockcellBlock - ByteBuffer containing the cells written by the Codec. The buffer should be
position()'ed at the start of the cell block and limit()'ed at the end.cellBlock. All cells created
out of the CellScanner will share the same ByteBuffer being passed.IOException - if cell encoding failsprivate ByteBuffer decompress(org.apache.hadoop.io.compress.CompressionCodec compressor, byte[] compressedCellBlock) throws IOException
IOExceptionprivate ByteBuff decompress(org.apache.hadoop.io.compress.CompressionCodec compressor, ByteBuff compressedCellBlock) throws IOException
IOExceptionprivate ByteBuffer decompress(org.apache.hadoop.io.compress.CompressionCodec compressor, InputStream cellBlockStream, int osInitialSize) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.