Package | Description |
---|---|
org.apache.hadoop.hbase.codec | |
org.apache.hadoop.hbase.io | |
org.apache.hadoop.hbase.io.compress | |
org.apache.hadoop.hbase.io.encoding | |
org.apache.hadoop.hbase.io.hfile |
Provides implementations of
HFile and HFile
BlockCache . |
org.apache.hadoop.hbase.io.hfile.bucket |
Provides
BucketCache , an implementation of
BlockCache . |
org.apache.hadoop.hbase.io.util | |
org.apache.hadoop.hbase.ipc |
Tools to help define network clients and servers.
|
org.apache.hadoop.hbase.nio | |
org.apache.hadoop.hbase.regionserver.wal | |
org.apache.hadoop.hbase.util |
Modifier and Type | Field and Description |
---|---|
protected ByteBuff |
KeyValueCodec.ByteBuffKeyValueDecoder.buf |
Modifier and Type | Method and Description |
---|---|
Codec.Decoder |
CellCodec.getDecoder(ByteBuff buf) |
Codec.Decoder |
Codec.getDecoder(ByteBuff buf) |
Codec.Decoder |
KeyValueCodecWithTags.getDecoder(ByteBuff buf) |
Codec.Decoder |
KeyValueCodec.getDecoder(ByteBuff buf) |
Codec.Decoder |
CellCodecWithTags.getDecoder(ByteBuff buf) |
Codec.Decoder |
MessageCodec.getDecoder(ByteBuff buf) |
Constructor and Description |
---|
ByteBuffKeyValueDecoder(ByteBuff buf) |
ByteBuffKeyValueDecoder(ByteBuff buf) |
Modifier and Type | Field and Description |
---|---|
private ByteBuff |
ByteBuffInputStream.buf |
Modifier and Type | Method and Description |
---|---|
ByteBuff |
ByteBuffAllocator.allocate(int size)
Allocate size bytes from the ByteBufAllocator, Note to call the
release() if
no need any more, otherwise the memory leak happen in NIO ByteBuffer pool. |
Modifier and Type | Method and Description |
---|---|
void |
ByteArrayOutputStream.toByteBuff(ByteBuff buff) |
int |
TagCompressionContext.uncompressTags(ByteBuff src,
byte[] dest,
int offset,
int length)
Uncompress tags from the input ByteBuffer and writes to the destination array.
|
Constructor and Description |
---|
ByteBuffInputStream(ByteBuff buf) |
Modifier and Type | Method and Description |
---|---|
static void |
Compression.decompress(ByteBuff dest,
InputStream bufferedBoundedStream,
int uncompressedSize,
Compression.Algorithm compressAlgo)
Decompresses data from the given stream using the configured compression algorithm.
|
Modifier and Type | Field and Description |
---|---|
private ByteBuff |
RowIndexSeekerV1.currentBuffer |
protected ByteBuff |
RowIndexSeekerV1.SeekerState.currentBuffer |
protected ByteBuff |
BufferedDataBlockEncoder.SeekerState.currentBuffer |
protected ByteBuff |
BufferedDataBlockEncoder.BufferedEncodedSeeker.currentBuffer |
private ByteBuff |
RowIndexSeekerV1.rowOffsets |
Modifier and Type | Method and Description |
---|---|
Cell |
DataBlockEncoder.getFirstKeyCellInBlock(ByteBuff block)
Return first key in block as a cell.
|
Cell |
FastDiffDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
DiffKeyDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
PrefixKeyDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
RowIndexCodecV1.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
CopyKeyDataBlockEncoder.getFirstKeyCellInBlock(ByteBuff block) |
void |
HFileBlockDecodingContext.prepareDecoding(int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
ByteBuff blockBufferWithoutHeader,
ByteBuff onDiskBlock)
Perform all actions that need to be done before the encoder's real decoding
process.
|
void |
HFileBlockDefaultDecodingContext.prepareDecoding(int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
ByteBuff blockBufferWithoutHeader,
ByteBuff onDiskBlock) |
void |
DataBlockEncoder.EncodedSeeker.setCurrentBuffer(ByteBuff buffer)
Set on which buffer there will be done seeking.
|
void |
RowIndexSeekerV1.setCurrentBuffer(ByteBuff buffer) |
void |
BufferedDataBlockEncoder.BufferedEncodedSeeker.setCurrentBuffer(ByteBuff buffer) |
Modifier and Type | Field and Description |
---|---|
private ByteBuff |
HFileReaderImpl.HFileScannerImpl.blockBuffer |
private ByteBuff |
HFileBlockBuilder.buf |
private ByteBuff |
HFileBlock.buf
The in-memory representation of the hfile block.
|
(package private) ByteBuff |
HFileBlock.PrefetchedHeader.buf |
Modifier and Type | Method and Description |
---|---|
private ByteBuff |
HFileBlock.FSReaderImpl.allocate(int size,
boolean intoHeap) |
private ByteBuff |
HFileBlock.Writer.cloneOnDiskBufferWithHeader()
Clones the header followed by the on-disk (compressed/encoded/encrypted) data.
|
(package private) ByteBuff |
HFileBlock.Writer.cloneUncompressedBufferWithHeader()
Clones the header followed by the uncompressed data, even if using
compression.
|
ByteBuff |
HFileBlock.getBufferReadOnly()
Returns a read-only duplicate of the buffer this block stores internally ready to be read.
|
ByteBuff |
HFileBlock.getBufferWithoutHeader()
Returns a buffer that does not include the header and checksum.
|
ByteBuff |
HFileBlock.getBufferWithoutHeader(boolean withChecksum)
Returns a buffer that does not include the header or checksum.
|
private ByteBuff |
HFileBlock.FSReaderImpl.getCachedHeader(long offset)
Check atomic reference cache for this block's header.
|
private ByteBuff |
HFileReaderImpl.EncodedScanner.getEncodedBuffer(HFileBlock newBlock) |
Modifier and Type | Method and Description |
---|---|
(package private) static int |
HFileBlockIndex.BlockIndexReader.binarySearchNonRootIndex(Cell key,
ByteBuff nonRootIndex,
CellComparator comparator)
Performs a binary search over a non-root level index block.
|
private void |
HFileBlock.FSReaderImpl.cacheNextBlockHeader(long offset,
ByteBuff onDiskBlock,
int onDiskSizeWithHeader,
int headerLength)
Save away the next blocks header in atomic reference.
|
boolean |
CompoundBloomFilter.contains(byte[] key,
int keyOffset,
int keyLength,
ByteBuff bloom) |
boolean |
CompoundBloomFilter.contains(Cell keyCell,
ByteBuff bloom,
BloomType type) |
(package private) static HFileBlock |
HFileBlock.createFromBuff(ByteBuff buf,
boolean usesHBaseChecksum,
long offset,
int nextBlockOnDiskSize,
HFileContext fileContext,
ByteBuffAllocator allocator)
Creates a block from an existing buffer starting with a header.
|
T |
CacheableDeserializer.deserialize(ByteBuff b,
ByteBuffAllocator allocator) |
HFileBlock |
HFileBlock.BlockDeserializer.deserialize(ByteBuff buf,
ByteBuffAllocator alloc) |
private int |
HFileBlock.FSReaderImpl.getNextBlockOnDiskSize(boolean readNextHeader,
ByteBuff onDiskBlock,
int onDiskSizeWithHeader) |
protected byte[] |
HFileBlockIndex.BlockIndexReader.getNonRootIndexedKey(ByteBuff nonRootIndex,
int i)
The indexed key at the ith position in the nonRootIndex.
|
private static int |
HFileBlock.getOnDiskSizeWithHeader(ByteBuff headerBuf,
boolean verifyChecksum)
Parse total on disk size including header and checksum.
|
(package private) static int |
HFileBlockIndex.BlockIndexReader.locateNonRootIndexEntry(ByteBuff nonRootBlock,
Cell key,
CellComparator comparator)
Search for one key using the secondary index in a non-root block.
|
private void |
HFileBlock.Writer.putHeader(ByteBuff buff,
int onDiskSize,
int uncompressedSize,
int onDiskDataSize) |
static BlockType |
BlockType.read(ByteBuff buf) |
protected boolean |
HFileBlock.FSReaderImpl.readAtOffset(org.apache.hadoop.fs.FSDataInputStream istream,
ByteBuff dest,
int size,
boolean peekIntoNextBlock,
long fileOffset,
boolean pread)
Does a positional read or a seek and read into the given byte buffer.
|
(package private) static String |
HFileBlock.toStringHeader(ByteBuff buf)
Convert the contents of the block header into a human readable string.
|
(package private) static boolean |
ChecksumUtil.validateChecksum(ByteBuff buf,
String pathName,
long offset,
int hdrSize)
Validates that the data in the specified HFileBlock matches the checksum.
|
private boolean |
HFileBlock.FSReaderImpl.validateChecksum(long offset,
ByteBuff data,
int hdrSize)
Generates the checksum for the header as well as the data and then validates it.
|
private static boolean |
ChecksumUtil.verifyChunkedSums(org.apache.hadoop.util.DataChecksum dataChecksum,
ByteBuff data,
ByteBuff checksums,
String pathName)
Like the hadoop's
DataChecksum.verifyChunkedSums(ByteBuffer, ByteBuffer, String, long) ,
this method will also verify checksum of each chunk in data. |
private void |
HFileBlock.FSReaderImpl.verifyOnDiskSizeMatchesHeader(int passedIn,
ByteBuff headerBuf,
long offset,
boolean verifyChecksum)
Verify the passed in onDiskSizeWithHeader aligns with what is in the header else something
is not right.
|
HFileBlockBuilder |
HFileBlockBuilder.withByteBuff(ByteBuff buf) |
void |
BlockType.write(ByteBuff buf) |
Constructor and Description |
---|
ExclusiveMemHFileBlock(BlockType blockType,
int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
long prevBlockOffset,
ByteBuff buf,
boolean fillHeader,
long offset,
int nextBlockOnDiskSize,
int onDiskDataSizeWithHeader,
HFileContext fileContext,
ByteBuffAllocator alloc) |
HFileBlock(BlockType blockType,
int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
long prevBlockOffset,
ByteBuff buf,
boolean fillHeader,
long offset,
int nextBlockOnDiskSize,
int onDiskDataSizeWithHeader,
HFileContext fileContext,
ByteBuffAllocator allocator)
Creates a new
HFile block from the given fields. |
SharedMemHFileBlock(BlockType blockType,
int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
long prevBlockOffset,
ByteBuff buf,
boolean fillHeader,
long offset,
int nextBlockOnDiskSize,
int onDiskDataSizeWithHeader,
HFileContext fileContext,
ByteBuffAllocator alloc) |
Modifier and Type | Method and Description |
---|---|
int |
FileIOEngine.FileAccessor.access(FileChannel fileChannel,
ByteBuff buff,
long accessOffset) |
int |
FileIOEngine.FileReadAccessor.access(FileChannel fileChannel,
ByteBuff buff,
long accessOffset) |
int |
FileIOEngine.FileWriteAccessor.access(FileChannel fileChannel,
ByteBuff buff,
long accessOffset) |
private void |
FileIOEngine.accessFile(FileIOEngine.FileAccessor accessor,
ByteBuff buff,
long globalOffset) |
(package private) Cacheable |
BucketEntry.wrapAsCacheable(ByteBuff buf) |
void |
FileMmapIOEngine.write(ByteBuff srcBuffer,
long offset) |
void |
FileIOEngine.write(ByteBuff srcBuff,
long offset) |
void |
IOEngine.write(ByteBuff srcBuffer,
long offset)
Transfers the data from the given MultiByteBuffer to IOEngine
|
void |
ByteBufferIOEngine.write(ByteBuff src,
long offset)
Transfers data from the given
ByteBuff to the buffer array. |
Modifier and Type | Method and Description |
---|---|
private static int |
BlockIOUtils.copyToByteBuff(byte[] buf,
int offset,
int len,
ByteBuff out) |
static boolean |
BlockIOUtils.preadWithExtra(ByteBuff buff,
org.apache.hadoop.fs.FSDataInputStream dis,
long position,
int necessaryLen,
int extraLen)
Read from an input stream at least
necessaryLen and if possible,
extraLen also if available. |
static void |
BlockIOUtils.readFully(ByteBuff buf,
org.apache.hadoop.fs.FSDataInputStream dis,
int length)
Read length bytes into ByteBuffers directly.
|
static void |
BlockIOUtils.readFullyWithHeapBuffer(InputStream in,
ByteBuff out,
int length)
Copying bytes from InputStream to
ByteBuff by using an temporary heap byte[] (default
size is 1024 now). |
static int |
StreamUtils.readRawVarint32(ByteBuff input) |
static boolean |
BlockIOUtils.readWithExtra(ByteBuff buf,
org.apache.hadoop.fs.FSDataInputStream dis,
int necessaryLen,
int extraLen)
Read bytes into ByteBuffers directly, those buffers either contains the extraLen bytes or only
contains necessaryLen bytes, which depends on how much bytes do the last time we read.
|
Modifier and Type | Field and Description |
---|---|
private ByteBuff |
ServerRpcConnection.ByteBuffByteInput.buf |
private ByteBuff |
SimpleServerRpcConnection.data |
Modifier and Type | Method and Description |
---|---|
private ByteBuff |
CellBlockBuilder.decompress(org.apache.hadoop.io.compress.CompressionCodec compressor,
ByteBuff compressedCellBlock) |
Modifier and Type | Method and Description |
---|---|
protected int |
SimpleServerRpcConnection.channelDataRead(ReadableByteChannel channel,
ByteBuff buf) |
CellScanner |
CellBlockBuilder.createCellScannerReusingBuffers(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
ByteBuff cellBlock) |
private ByteBuff |
CellBlockBuilder.decompress(org.apache.hadoop.io.compress.CompressionCodec compressor,
ByteBuff compressedCellBlock) |
(package private) void |
NettyServerRpcConnection.process(ByteBuff buf) |
private void |
ServerRpcConnection.processConnectionHeader(ByteBuff buf) |
void |
ServerRpcConnection.processOneRpc(ByteBuff buf) |
protected void |
ServerRpcConnection.processRequest(ByteBuff buf) |
void |
ServerRpcConnection.saslReadAndProcess(ByteBuff saslToken) |
Constructor and Description |
---|
ByteBuffByteInput(ByteBuff buf,
int offset,
int length) |
Modifier and Type | Class and Description |
---|---|
class |
MultiByteBuff
Provides a unified view of all the underlying ByteBuffers and will look as if a bigger
sequential buffer.
|
class |
SingleByteBuff
An implementation of ByteBuff where a single BB backs the BBI.
|
Modifier and Type | Method and Description |
---|---|
abstract ByteBuff |
ByteBuff.duplicate()
Returns an ByteBuff which is a duplicate version of this ByteBuff.
|
abstract ByteBuff |
ByteBuff.limit(int limit)
Marks the limit of this ByteBuff.
|
abstract ByteBuff |
ByteBuff.mark()
Marks the current position of the ByteBuff
|
abstract ByteBuff |
ByteBuff.moveBack(int len)
Jumps back the current position of this ByteBuff by specified length.
|
abstract ByteBuff |
ByteBuff.position(int position)
Sets this ByteBuff's position to the given value.
|
abstract ByteBuff |
ByteBuff.put(byte b)
Writes a byte to this ByteBuff at the current position and increments the position
|
abstract ByteBuff |
ByteBuff.put(byte[] src)
Copies from the given byte[] to this ByteBuff
|
abstract ByteBuff |
ByteBuff.put(byte[] src,
int offset,
int length)
Copies from the given byte[] to this ByteBuff
|
abstract ByteBuff |
ByteBuff.put(int index,
byte b)
Writes a byte to this ByteBuff at the given index
|
abstract ByteBuff |
ByteBuff.put(int offset,
ByteBuff src,
int srcOffset,
int length)
Copies the contents from the src ByteBuff to this ByteBuff.
|
abstract ByteBuff |
ByteBuff.putInt(int value)
Writes an int to this ByteBuff at its current position.
|
abstract ByteBuff |
ByteBuff.putLong(long value)
Writes a long to this ByteBuff at its current position.
|
abstract ByteBuff |
ByteBuff.reset()
Similar to
ByteBuffer .reset(), ensures that this ByteBuff
is reset back to last marked position. |
abstract ByteBuff |
ByteBuff.rewind()
Rewinds this ByteBuff and the position is set to 0
|
abstract ByteBuff |
ByteBuff.skip(int len)
Jumps the current position of this ByteBuff by specified length.
|
abstract ByteBuff |
ByteBuff.slice()
Returns an ByteBuff which is a sliced version of this ByteBuff.
|
static ByteBuff |
ByteBuff.wrap(ByteBuffer buffer) |
static ByteBuff |
ByteBuff.wrap(ByteBuffer[] buffers) |
static ByteBuff |
ByteBuff.wrap(ByteBuffer[] buffers,
ByteBuffAllocator.Recycler recycler) |
static ByteBuff |
ByteBuff.wrap(ByteBuffer[] buffers,
RefCnt refCnt)
In theory, the upstream should never construct an ByteBuff by passing an given refCnt, so
please don't use this public method in other place.
|
private static ByteBuff |
ByteBuff.wrap(ByteBuffer buffer,
RefCnt refCnt)
Make this private because we don't want to expose the refCnt related wrap method to upstream.
|
static ByteBuff |
ByteBuff.wrap(List<ByteBuffer> buffers) |
static ByteBuff |
ByteBuff.wrap(List<ByteBuffer> buffers,
ByteBuffAllocator.Recycler recycler) |
private static ByteBuff |
ByteBuff.wrap(List<ByteBuffer> buffers,
RefCnt refCnt)
Make this private because we don't want to expose the refCnt related wrap method to upstream.
|
Modifier and Type | Method and Description |
---|---|
static int |
ByteBuff.compareTo(ByteBuff buf1,
int o1,
int len1,
ByteBuff buf2,
int o2,
int len2)
Compares two ByteBuffs
|
private static ByteBuffer |
MultiByteBuff.getItemByteBuffer(ByteBuff buf,
int index) |
abstract ByteBuff |
ByteBuff.put(int offset,
ByteBuff src,
int srcOffset,
int length)
Copies the contents from the src ByteBuff to this ByteBuff.
|
SingleByteBuff |
SingleByteBuff.put(int offset,
ByteBuff src,
int srcOffset,
int length) |
MultiByteBuff |
MultiByteBuff.put(int offset,
ByteBuff src,
int srcOffset,
int length)
Copies from a src MBB to this MBB.
|
static int |
ByteBuff.readCompressedInt(ByteBuff buf)
Read integer from ByteBuff coded in 7 bits and increment position.
|
static long |
ByteBuff.readLong(ByteBuff in,
int fitInBytes)
Read long which was written to fitInBytes bytes and increment position.
|
Modifier and Type | Method and Description |
---|---|
Codec.Decoder |
WALCellCodec.getDecoder(ByteBuff buf) |
Modifier and Type | Field and Description |
---|---|
private static BiConsumer<ByteBuffer,ByteBuff> |
ByteBufferArray.READER
Transfer bytes from source
ByteBuffer to destination ByteBuff , Position of both
source and destination will be advanced. |
private static BiConsumer<ByteBuffer,ByteBuff> |
ByteBufferArray.WRITER
Transfer bytes from source
ByteBuff to destination ByteBuffer . |
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
BloomFilterUtil.checkBit(int pos,
ByteBuff bloomBuf,
int bloomOffset)
Check if bit at specified index is 1.
|
boolean |
BloomFilter.contains(byte[] buf,
int offset,
int length,
ByteBuff bloom)
Check if the specified key is contained in the bloom filter.
|
static boolean |
BloomFilterUtil.contains(byte[] buf,
int offset,
int length,
ByteBuff bloomBuf,
int bloomOffset,
int bloomSize,
Hash hash,
int hashCount) |
private static <T> boolean |
BloomFilterUtil.contains(ByteBuff bloomBuf,
int bloomOffset,
int bloomSize,
Hash hash,
int hashCount,
HashKey<T> hashKey) |
boolean |
BloomFilter.contains(Cell keyCell,
ByteBuff bloom,
BloomType type)
Check if the specified key is contained in the bloom filter.
|
static boolean |
BloomFilterUtil.contains(Cell cell,
ByteBuff bloomBuf,
int bloomOffset,
int bloomSize,
Hash hash,
int hashCount,
BloomType type) |
private int |
ByteBufferArray.internalTransfer(long offset,
ByteBuff b,
BiConsumer<ByteBuffer,ByteBuff> transfer)
Transferring all remaining bytes from b to the buffers array starting at offset, or
transferring bytes from the buffers array at offset to b until b is filled.
|
int |
ByteBufferArray.read(long offset,
ByteBuff dst)
Transfers bytes from this buffers array into the given destination
ByteBuff |
static long |
ByteBufferUtils.readVLong(ByteBuff in)
Deprecated.
Similar to
WritableUtils.readVLong(java.io.DataInput) but reads from a
ByteBuff . |
int |
ByteBufferArray.write(long offset,
ByteBuff src)
Transfers bytes from the given source
ByteBuff into this buffer array |
Modifier and Type | Method and Description |
---|---|
private int |
ByteBufferArray.internalTransfer(long offset,
ByteBuff b,
BiConsumer<ByteBuffer,ByteBuff> transfer)
Transferring all remaining bytes from b to the buffers array starting at offset, or
transferring bytes from the buffers array at offset to b until b is filled.
|
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.