Uses of Class
org.apache.hadoop.hbase.nio.ByteBuff
Packages that use ByteBuff
Package
Description
Provides implementations of
HFile and HFile
BlockCache.Provides
BucketCache, an implementation of
BlockCache.Tools to help define network clients and servers.
-
Uses of ByteBuff in org.apache.hadoop.hbase.codec
Fields in org.apache.hadoop.hbase.codec declared as ByteBuffModifier and TypeFieldDescriptionprotected final ByteBuffKeyValueCodec.ByteBuffKeyValueDecoder.bufMethods in org.apache.hadoop.hbase.codec with parameters of type ByteBuffModifier and TypeMethodDescriptionCellCodec.getDecoder(ByteBuff buf) CellCodecWithTags.getDecoder(ByteBuff buf) Codec.getDecoder(ByteBuff buf) KeyValueCodec.getDecoder(ByteBuff buf) KeyValueCodecWithTags.getDecoder(ByteBuff buf) MessageCodec.getDecoder(ByteBuff buf) Constructors in org.apache.hadoop.hbase.codec with parameters of type ByteBuffModifierConstructorDescription -
Uses of ByteBuff in org.apache.hadoop.hbase.io
Fields in org.apache.hadoop.hbase.io declared as ByteBuffMethods in org.apache.hadoop.hbase.io that return ByteBuffModifier and TypeMethodDescriptionByteBuffAllocator.allocate(int size) Allocate size bytes from the ByteBufAllocator, Note to call therelease()if no need any more, otherwise the memory leak happen in NIO ByteBuffer pool.Methods in org.apache.hadoop.hbase.io with parameters of type ByteBuffModifier and TypeMethodDescriptionvoidByteArrayOutputStream.toByteBuff(ByteBuff buff) intTagCompressionContext.uncompressTags(ByteBuff src, byte[] dest, int offset, int length) Uncompress tags from the input ByteBuffer and writes to the destination array.Constructors in org.apache.hadoop.hbase.io with parameters of type ByteBuff -
Uses of ByteBuff in org.apache.hadoop.hbase.io.compress
Methods in org.apache.hadoop.hbase.io.compress with parameters of type ByteBuffModifier and TypeMethodDescriptionbooleanByteBuffDecompressor.canDecompress(ByteBuff output, ByteBuff input) Signals of these two particularByteBuffs are compatible with this decompressor.static intBlockDecompressorHelper.decompress(ByteBuff output, ByteBuff input, int inputSize, BlockDecompressorHelper.RawDecompressor rawDecompressor) intBlockDecompressorHelper.RawDecompressor.decompress(ByteBuff output, ByteBuff input, int inputLen) intByteBuffDecompressor.decompress(ByteBuff output, ByteBuff input, int inputLen) Fills the ouput buffer with uncompressed data.private static intBlockDecompressorHelper.rawReadInt(ByteBuff input) Read an integer from the buffer in big-endian byte order. -
Uses of ByteBuff in org.apache.hadoop.hbase.io.compress.zstd
Methods in org.apache.hadoop.hbase.io.compress.zstd with parameters of type ByteBuffModifier and TypeMethodDescriptionbooleanZstdByteBuffDecompressor.canDecompress(ByteBuff output, ByteBuff input) intZstdByteBuffDecompressor.decompress(ByteBuff output, ByteBuff input, int inputLen) private intZstdByteBuffDecompressor.decompressRaw(ByteBuff output, ByteBuff input, int inputLen) -
Uses of ByteBuff in org.apache.hadoop.hbase.io.encoding
Fields in org.apache.hadoop.hbase.io.encoding declared as ByteBuffModifier and TypeFieldDescriptionprotected ByteBuffBufferedDataBlockEncoder.BufferedEncodedSeeker.currentBufferprotected ByteBuffBufferedDataBlockEncoder.SeekerState.currentBufferprivate ByteBuffRowIndexSeekerV1.currentBufferprotected ByteBuffRowIndexSeekerV1.SeekerState.currentBufferprivate ByteBuffRowIndexSeekerV1.rowOffsetsMethods in org.apache.hadoop.hbase.io.encoding with parameters of type ByteBuffModifier and TypeMethodDescriptionprivate booleanHFileBlockDefaultDecodingContext.canDecompressViaByteBuff(ByteBuff blockBufferWithoutHeader, ByteBuff onDiskBlock) private voidHFileBlockDefaultDecodingContext.decompressViaByteBuff(ByteBuff blockBufferWithoutHeader, ByteBuff onDiskBlock, int onDiskSizeWithoutHeader) When only decompression is needed (not decryption), and the input and output buffers are SingleByteBuffs, and the decompression algorithm supports it, we can do decompression without any intermediate heap buffers.CopyKeyDataBlockEncoder.getFirstKeyCellInBlock(ByteBuff block) DataBlockEncoder.getFirstKeyCellInBlock(ByteBuff block) Return first key in block as a cell.DiffKeyDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) FastDiffDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) PrefixKeyDeltaEncoder.getFirstKeyCellInBlock(ByteBuff block) RowIndexCodecV1.getFirstKeyCellInBlock(ByteBuff block) voidHFileBlockDecodingContext.prepareDecoding(int onDiskSizeWithoutHeader, int uncompressedSizeWithoutHeader, ByteBuff blockBufferWithoutHeader, ByteBuff onDiskBlock) Perform all actions that need to be done before the encoder's real decoding process.voidHFileBlockDefaultDecodingContext.prepareDecoding(int onDiskSizeWithoutHeader, int uncompressedSizeWithoutHeader, ByteBuff blockBufferWithoutHeader, ByteBuff onDiskBlock) voidBufferedDataBlockEncoder.BufferedEncodedSeeker.setCurrentBuffer(ByteBuff buffer) voidDataBlockEncoder.EncodedSeeker.setCurrentBuffer(ByteBuff buffer) Set on which buffer there will be done seeking.voidRowIndexSeekerV1.setCurrentBuffer(ByteBuff buffer) -
Uses of ByteBuff in org.apache.hadoop.hbase.io.hfile
Fields in org.apache.hadoop.hbase.io.hfile declared as ByteBuffModifier and TypeFieldDescriptionprivate ByteBuffHFileReaderImpl.HFileScannerImpl.blockBuffer(package private) final ByteBuffHFileBlock.PrefetchedHeader.bufprivate ByteBuffHFileBlockBuilder.bufprivate ByteBuffHFileBlock.bufWithoutChecksumThe in-memory representation of the hfile block.Methods in org.apache.hadoop.hbase.io.hfile that return ByteBuffModifier and TypeMethodDescriptionprivate ByteBuffHFileBlock.FSReaderImpl.allocate(int size, boolean intoHeap) private ByteBuffHFileBlock.allocateBufferForUnpacking()Always allocates a new buffer of the correct size.private ByteBuffHFileBlock.Writer.cloneOnDiskBufferWithHeader()Clones the header followed by the on-disk (compressed/encoded/encrypted) data.(package private) ByteBuffHFileBlock.Writer.cloneUncompressedBufferWithHeader()Clones the header followed by the uncompressed data, even if using compression.HFileBlock.getBufferReadOnly()Returns a read-only duplicate of the buffer this block stores internally ready to be read.HFileBlock.getBufferWithoutHeader()Returns a buffer that does not include the header and checksum.private ByteBuffHFileBlock.FSReaderImpl.getCachedHeader(long offset) Check atomic reference cache for this block's header.private ByteBuffHFileReaderImpl.EncodedScanner.getEncodedBuffer(HFileBlock newBlock) Methods in org.apache.hadoop.hbase.io.hfile with parameters of type ByteBuffModifier and TypeMethodDescription(package private) static intHFileBlockIndex.BlockIndexReader.binarySearchNonRootIndex(Cell key, ByteBuff nonRootIndex, CellComparator comparator) Performs a binary search over a non-root level index block.private voidHFileBlock.FSReaderImpl.cacheNextBlockHeader(long offset, ByteBuff onDiskBlock, int onDiskSizeWithHeader, int headerLength) Save away the next blocks header in atomic reference.private booleanHFileBlock.FSReaderImpl.checkCheckSumTypeOnHeaderBuf(ByteBuff headerBuf) Check that checksumType onheaderBufread from a block header seems reasonable, within the known value range.booleanbooleanprivate booleanCompoundBloomFilter.containsInternal(byte[] key, int keyOffset, int keyLength, ByteBuff bloom) private booleanCompoundBloomFilter.containsInternal(Cell keyCell, ByteBuff bloom, BloomType type) private static HFileBlockBuilderHFileBlock.createBuilder(HFileBlock blk, ByteBuff newBuff) Creates a new HFileBlockBuilder from the existing block and a new ByteBuff.(package private) static HFileBlockHFileBlock.createFromBuff(ByteBuff buf, boolean usesHBaseChecksum, long offset, int nextBlockOnDiskSize, HFileContext fileContext, ByteBuffAllocator allocator) Creates a block from an existing buffer starting with a header.CacheableDeserializer.deserialize(ByteBuff b, ByteBuffAllocator allocator) HFileBlock.BlockDeserializer.deserialize(ByteBuff buf, ByteBuffAllocator alloc) private intHFileBlock.FSReaderImpl.getNextBlockOnDiskSize(ByteBuff onDiskBlock, int onDiskSizeWithHeader) (package private) static byte[]HFileBlockIndex.BlockIndexReader.getNonRootIndexedKey(ByteBuff nonRootIndex, int i) The indexed key at the ith position in the nonRootIndex.private static intHFileBlock.getOnDiskSizeWithHeader(ByteBuff headerBuf, boolean checksumSupport) Parse total on disk size including header and checksum.static intHFileBlockIndex.BlockIndexReader.locateNonRootIndexEntry(ByteBuff nonRootBlock, Cell key, CellComparator comparator) Search for one key using the secondary index in a non-root block.private voidHFileBlock.Writer.putHeader(ByteBuff buff, int onDiskSize, int uncompressedSize, int onDiskDataSize) static BlockTypeprotected booleanHFileBlock.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.private static HFileBlockHFileBlock.shallowClone(HFileBlock blk, ByteBuff newBuf) (package private) static StringHFileBlock.toStringHeader(ByteBuff buf) Convert the contents of the block header into a human readable string.(package private) static booleanChecksumUtil.validateChecksum(ByteBuff buf, String pathName, long offset, int hdrSize) Validates that the data in the specified HFileBlock matches the checksum.private booleanHFileBlock.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 booleanChecksumUtil.verifyChunkedSums(org.apache.hadoop.util.DataChecksum dataChecksum, ByteBuff data, ByteBuff checksums, String pathName) Like the hadoop'sDataChecksum.verifyChunkedSums(ByteBuffer, ByteBuffer, String, long), this method will also verify checksum of each chunk in data.HFileBlockBuilder.withByteBuff(ByteBuff buf) voidConstructors in org.apache.hadoop.hbase.io.hfile with parameters of type ByteBuffModifierConstructorDescription(package private)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 newHFileblock from the given fields.(package private)SharedMemHFileBlock(BlockType blockType, int onDiskSizeWithoutHeader, int uncompressedSizeWithoutHeader, long prevBlockOffset, ByteBuff buf, boolean fillHeader, long offset, int nextBlockOnDiskSize, int onDiskDataSizeWithHeader, HFileContext fileContext, ByteBuffAllocator alloc) -
Uses of ByteBuff in org.apache.hadoop.hbase.io.hfile.bucket
Methods in org.apache.hadoop.hbase.io.hfile.bucket with parameters of type ByteBuffModifier and TypeMethodDescriptionintFileIOEngine.FileAccessor.access(FileChannel fileChannel, ByteBuff buff, long accessOffset) intFileIOEngine.FileReadAccessor.access(FileChannel fileChannel, ByteBuff buff, long accessOffset) intFileIOEngine.FileWriteAccessor.access(FileChannel fileChannel, ByteBuff buff, long accessOffset) private voidFileIOEngine.accessFile(FileIOEngine.FileAccessor accessor, ByteBuff buff, long globalOffset) (package private) CacheableBucketEntry.wrapAsCacheable(ByteBuff buf) voidTransfers data from the givenByteBuffto the buffer array.voidvoidvoidTransfers the data from the given MultiByteBuffer to IOEngine -
Uses of ByteBuff in org.apache.hadoop.hbase.io.util
Methods in org.apache.hadoop.hbase.io.util with parameters of type ByteBuffModifier and TypeMethodDescriptionprivate static intBlockIOUtils.copyToByteBuff(byte[] buf, int offset, int len, ByteBuff out) static booleanBlockIOUtils.preadWithExtra(ByteBuff buff, org.apache.hadoop.fs.FSDataInputStream dis, long position, int necessaryLen, int extraLen) Read from an input stream at leastnecessaryLenand if possible,extraLenalso if available.static booleanBlockIOUtils.preadWithExtra(ByteBuff buff, org.apache.hadoop.fs.FSDataInputStream dis, long position, int necessaryLen, int extraLen, boolean readAllBytes) Read from an input stream at leastnecessaryLenand if possible,extraLenalso if available.private static booleanBlockIOUtils.preadWithExtraDirectly(ByteBuff buff, org.apache.hadoop.fs.FSDataInputStream dis, long position, int necessaryLen, int extraLen, boolean readAllBytes) private static booleanBlockIOUtils.preadWithExtraOnHeap(ByteBuff buff, org.apache.hadoop.fs.FSDataInputStream dis, long position, int necessaryLen, int extraLen, boolean readAllBytes) static voidRead length bytes into ByteBuffers directly.static voidBlockIOUtils.readFullyWithHeapBuffer(InputStream in, ByteBuff out, int length) Copying bytes from InputStream toByteBuffby using an temporary heap byte[] (default size is 1024 now).static intStreamUtils.readRawVarint32(ByteBuff input) static booleanBlockIOUtils.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. -
Uses of ByteBuff in org.apache.hadoop.hbase.ipc
Fields in org.apache.hadoop.hbase.ipc declared as ByteBuffModifier and TypeFieldDescriptionprivate ByteBuffServerRpcConnection.ByteBuffByteInput.bufprivate ByteBuffSimpleServerRpcConnection.dataDeprecated.Methods in org.apache.hadoop.hbase.ipc that return ByteBuffModifier and TypeMethodDescriptionprivate ByteBuffCellBlockBuilder.decompress(org.apache.hadoop.io.compress.CompressionCodec compressor, ByteBuff compressedCellBlock) Methods in org.apache.hadoop.hbase.ipc with parameters of type ByteBuffModifier and TypeMethodDescriptionprotected intSimpleServerRpcConnection.channelDataRead(ReadableByteChannel channel, ByteBuff buf) Deprecated.CellBlockBuilder.createCellScannerReusingBuffers(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, ByteBuff cellBlock) Create a cell scanner using an existing bytebuff.private org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStreamprivate ByteBuffCellBlockBuilder.decompress(org.apache.hadoop.io.compress.CompressionCodec compressor, ByteBuff compressedCellBlock) private voidServerRpcConnection.processConnectionHeader(ByteBuff buf) voidServerRpcConnection.processOneRpc(ByteBuff buf) protected voidServerRpcConnection.processRequest(ByteBuff buf) Has the request header and the request param and optionally encoded data buffer all in this one array.private voidSimpleServerRpcConnection.saslReadAndProcess(ByteBuff saslToken) Deprecated.Constructors in org.apache.hadoop.hbase.ipc with parameters of type ByteBuff -
Uses of ByteBuff in org.apache.hadoop.hbase.nio
Subclasses of ByteBuff in org.apache.hadoop.hbase.nioModifier and TypeClassDescriptionclassProvides a unified view of all the underlying ByteBuffers and will look as if a bigger sequential buffer.classAn implementation of ByteBuff where a single BB backs the BBI.Methods in org.apache.hadoop.hbase.nio that return ByteBuffModifier and TypeMethodDescriptionabstract ByteBuffByteBuff.duplicate()Returns an ByteBuff which is a duplicate version of this ByteBuff.abstract ByteBuffByteBuff.limit(int limit) Marks the limit of this ByteBuffabstract ByteBuffByteBuff.mark()Marks the current position of the ByteBuffabstract ByteBuffByteBuff.moveBack(int len) Jumps back the current position of this ByteBuff by specified length.abstract ByteBuffByteBuff.position(int position) Sets this ByteBuff's position to the given value.abstract ByteBuffByteBuff.put(byte b) Writes a byte to this ByteBuff at the current position and increments the positionabstract ByteBuffByteBuff.put(byte[] src) Copies from the given byte[] to this ByteBuffabstract ByteBuffByteBuff.put(byte[] src, int offset, int length) Copies from the given byte[] to this ByteBuffabstract ByteBuffByteBuff.put(int index, byte b) Writes a byte to this ByteBuff at the given indexabstract ByteBuffCopies the contents from the src ByteBuff to this ByteBuff.abstract ByteBuffByteBuff.putInt(int value) Writes an int to this ByteBuff at its current position.abstract ByteBuffByteBuff.putLong(long value) Writes a long to this ByteBuff at its current position.abstract ByteBuffByteBuff.reset()Similar toByteBuffer.reset(), ensures that this ByteBuff is reset back to last marked position.abstract ByteBuffByteBuff.rewind()Rewinds this ByteBuff and the position is set to 0abstract ByteBuffByteBuff.skip(int len) Jumps the current position of this ByteBuff by specified length.abstract ByteBuffByteBuff.slice()Returns an ByteBuff which is a sliced version of this ByteBuff.ByteBuff.touch()Calling this method in strategic locations where ByteBuffs are referenced may help diagnose potential buffer leaks.static ByteBuffByteBuff.wrap(ByteBuffer buffer) static ByteBuffByteBuff.wrap(ByteBuffer[] buffers) static ByteBuffByteBuff.wrap(ByteBuffer[] buffers, ByteBuffAllocator.Recycler recycler) static ByteBuffByteBuff.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 ByteBuffByteBuff.wrap(ByteBuffer buffer, RefCnt refCnt) static ByteBuffByteBuff.wrap(List<ByteBuffer> buffers) static ByteBuffByteBuff.wrap(List<ByteBuffer> buffers, ByteBuffAllocator.Recycler recycler) private static ByteBuffByteBuff.wrap(List<ByteBuffer> buffers, RefCnt refCnt) Methods in org.apache.hadoop.hbase.nio with parameters of type ByteBuffModifier and TypeMethodDescriptionstatic intCompares two ByteBuffsprivate static ByteBufferMultiByteBuff.getItemByteBuffer(ByteBuff buf, int byteBufferIndex) private static intMultiByteBuff.getItemByteBufferCount(ByteBuff buf) private static intMultiByteBuff.getItemIndexForByteBuff(ByteBuff byteBuff, int offset, int length) private static intMultiByteBuff.getRelativeOffsetForByteBuff(ByteBuff byteBuff, int globalOffset, int itemIndex) abstract ByteBuffCopies the contents from the src ByteBuff to this ByteBuff.Copies from a src BB to this MBB.static intByteBuff.readCompressedInt(ByteBuff buf) Read integer from ByteBuff coded in 7 bits and increment position.static longRead long which was written to fitInBytes bytes and increment position. -
Uses of ByteBuff in org.apache.hadoop.hbase.regionserver.wal
Methods in org.apache.hadoop.hbase.regionserver.wal with parameters of type ByteBuff -
Uses of ByteBuff in org.apache.hadoop.hbase.util
Fields in org.apache.hadoop.hbase.util with type parameters of type ByteBuffModifier and TypeFieldDescriptionprivate static final BiConsumer<ByteBuffer,ByteBuff> ByteBufferArray.READERTransfer bytes from sourceByteBufferto destinationByteBuff, Position of both source and destination will be advanced.private static final BiConsumer<ByteBuffer,ByteBuff> ByteBufferArray.WRITERTransfer bytes from sourceByteBuffto destinationByteBuffer.Methods in org.apache.hadoop.hbase.util with parameters of type ByteBuffModifier and TypeMethodDescription(package private) static booleanCheck if bit at specified index is 1.booleanCheck if the specified key is contained in the bloom filter.booleanCheck if the specified key is contained in the bloom filter.static booleanBloomFilterUtil.contains(byte[] buf, int offset, int length, ByteBuff bloomBuf, int bloomOffset, int bloomSize, Hash hash, int hashCount) static booleanBloomFilterUtil.contains(Cell cell, ByteBuff bloomBuf, int bloomOffset, int bloomSize, Hash hash, int hashCount, BloomType type) private static <T> booleanBloomFilterUtil.contains(ByteBuff bloomBuf, int bloomOffset, int bloomSize, Hash hash, int hashCount, HashKey<T> hashKey) private intByteBufferArray.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.intTransfers bytes from this buffers array into the given destinationByteBuffstatic longSimilar toWritableUtils.readVLong(java.io.DataInput)but reads from aByteBuff.intTransfers bytes from the given sourceByteBuffinto this buffer arrayMethod parameters in org.apache.hadoop.hbase.util with type arguments of type ByteBuffModifier and TypeMethodDescriptionprivate intByteBufferArray.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.