Modifier and Type | Field and Description |
---|---|
protected ByteBuff |
KeyValueCodec.ByteBuffKeyValueDecoder.buf |
Modifier and Type | Method and Description |
---|---|
Codec.Decoder |
CellCodecWithTags.getDecoder(ByteBuff buf) |
Codec.Decoder |
Codec.getDecoder(ByteBuff buf) |
Codec.Decoder |
KeyValueCodec.getDecoder(ByteBuff buf) |
Codec.Decoder |
CellCodec.getDecoder(ByteBuff buf) |
Codec.Decoder |
KeyValueCodecWithTags.getDecoder(ByteBuff buf) |
Constructor and Description |
---|
ByteBuffKeyValueDecoder(ByteBuff buf) |
ByteBuffKeyValueDecoder(ByteBuff 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 |
---|---|
Cell |
DiffKeyDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
CopyKeyDataBlockEncoder.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
PrefixKeyDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
RowIndexCodecV1.getFirstKeyCellInBlock(ByteBuff block) |
Cell |
DataBlockEncoder.getFirstKeyCellInBlock(ByteBuff block)
Return first key in block as a cell.
|
Cell |
FastDiffDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) |
void |
HFileBlockDefaultDecodingContext.prepareDecoding(int onDiskSizeWithoutHeader,
int uncompressedSizeWithoutHeader,
ByteBuff blockBufferWithoutHeader,
ByteBuff onDiskBlock) |
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 |
RowIndexSeekerV1.setCurrentBuffer(ByteBuff buffer) |
void |
DataBlockEncoder.EncodedSeeker.setCurrentBuffer(ByteBuff buffer)
Set on which buffer there will be done seeking.
|
Modifier and Type | Method and Description |
---|---|
static BlockType |
BlockType.read(ByteBuff buf) |
void |
BlockType.write(ByteBuff buf) |
Modifier and Type | Method and Description |
---|---|
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 boolean |
BlockIOUtils.preadWithExtra(ByteBuff buff,
org.apache.hadoop.fs.FSDataInputStream dis,
long position,
int necessaryLen,
int extraLen,
boolean readAllBytes)
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 | 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.
|
ByteBuff |
ByteBuff.touch()
Calling this method in strategic locations where ByteBuffs are referenced may help diagnose
potential buffer leaks.
|
ByteBuff |
ByteBuff.touch(Object hint) |
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.
|
static ByteBuff |
ByteBuff.wrap(List<ByteBuffer> buffers) |
static ByteBuff |
ByteBuff.wrap(List<ByteBuffer> buffers,
ByteBuffAllocator.Recycler recycler) |
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
|
MultiByteBuff |
MultiByteBuff.put(int destOffset,
ByteBuff src,
int srcOffset,
int length)
Copies from a src BB to this MBB.
|
SingleByteBuff |
SingleByteBuff.put(int offset,
ByteBuff src,
int srcOffset,
int length) |
abstract ByteBuff |
ByteBuff.put(int offset,
ByteBuff src,
int srcOffset,
int length)
Copies the contents from the src ByteBuff to this ByteBuff.
|
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 |
---|---|
int |
ByteBufferArray.read(long offset,
ByteBuff dst)
Transfers bytes from this buffers array into the given destination
ByteBuff |
static long |
ByteBufferUtils.readVLong(ByteBuff buf)
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 |
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.