Package org.apache.hadoop.hbase.io.hfile
Class HFileContext
java.lang.Object
org.apache.hadoop.hbase.io.hfile.HFileContext
Read-only HFile Context Information. Meta data that is used by HFileWriter/Readers and by
HFileBlocks. Create one using the
HFileContextBuilder (See HFileInfo and the HFile
Trailer class).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intNumber of uncompressed bytes we allow per block.private intthe number of bytes per checksum valueprivate CellComparatorprivate ChecksumTypethe checksum typeprivate byte[]private Compression.AlgorithmCompression algorithm usedprivate booleanWhether tags to be compressed or notprivate Encryption.ContextEncryption algorithm and key usedDetails used by compression algorithm that are more efficiently loaded once and then reusedprivate static final intprivate DataBlockEncodingprivate longstatic final longprivate Stringprivate booleanWhether mvcc is to be included in the Read/Writeprivate booleanWhether tags are to be included in the Read/Writeprivate IndexBlockEncodingprivate byte[]private booleanWhether checksum is enabled or not -
Constructor Summary
ConstructorsConstructorDescriptionHFileContext(boolean useHBaseChecksum, boolean includesMvcc, boolean includesTags, Compression.Algorithm compressAlgo, Compression.HFileDecompressionContext decompressionContext, boolean compressTags, ChecksumType checksumType, int bytesPerChecksum, int blockSize, DataBlockEncoding encoding, Encryption.Context cryptoContext, long fileCreateTime, String hfileName, byte[] columnFamily, byte[] tableName, CellComparator cellComparator, IndexBlockEncoding indexBlockEncoding) HFileContext(HFileContext context) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionclone()intintbyte[]Get an object that, if non-null, may be cast into a codec-specific type that exposes some information from the store-file-specific Configuration that is relevant to decompression.longbyte[]longheapSize()HeapSize implementation.booleanReturns true when on-disk blocks are compressed, and/or encrypted; false otherwise.booleanbooleanbooleanbooleanvoidsetCompressTags(boolean compressTags) voidsetEncryptionContext(Encryption.Context cryptoContext) voidsetFileCreateTime(long fileCreateTime) voidsetIncludesMvcc(boolean includesMvcc) voidsetIncludesTags(boolean includesTags) toString()
-
Field Details
-
FIXED_OVERHEAD
-
DEFAULT_BYTES_PER_CHECKSUM
- See Also:
-
usesHBaseChecksum
Whether checksum is enabled or not -
includesMvcc
Whether mvcc is to be included in the Read/Write -
includesTags
Whether tags are to be included in the Read/Write -
compressAlgo
Compression algorithm used -
decompressionContext
Details used by compression algorithm that are more efficiently loaded once and then reused -
compressTags
Whether tags to be compressed or not -
checksumType
the checksum type -
bytesPerChecksum
the number of bytes per checksum value -
blockSize
Number of uncompressed bytes we allow per block. -
encoding
-
indexBlockEncoding
-
cryptoContext
Encryption algorithm and key used -
fileCreateTime
-
hfileName
-
columnFamily
-
tableName
-
cellComparator
-
-
Constructor Details
-
HFileContext
public HFileContext() -
HFileContext
Copy constructor -
HFileContext
HFileContext(boolean useHBaseChecksum, boolean includesMvcc, boolean includesTags, Compression.Algorithm compressAlgo, Compression.HFileDecompressionContext decompressionContext, boolean compressTags, ChecksumType checksumType, int bytesPerChecksum, int blockSize, DataBlockEncoding encoding, Encryption.Context cryptoContext, long fileCreateTime, String hfileName, byte[] columnFamily, byte[] tableName, CellComparator cellComparator, IndexBlockEncoding indexBlockEncoding)
-
-
Method Details
-
isCompressedOrEncrypted
Returns true when on-disk blocks are compressed, and/or encrypted; false otherwise. -
getCompression
-
getDecompressionContext
Get an object that, if non-null, may be cast into a codec-specific type that exposes some information from the store-file-specific Configuration that is relevant to decompression. For example, ZSTD tables can have "hbase.io.compress.zstd.dictionary" on their table descriptor, and decompressions of blocks in that table must use that dictionary. It's cheaper for HBase to load these settings into an object of their own once and check this upon each block decompression, than it is to call intoConfiguration.get(String)on each block decompression. -
isUseHBaseChecksum
-
isIncludesMvcc
-
setIncludesMvcc
-
isIncludesTags
-
setIncludesTags
-
setFileCreateTime
-
isCompressTags
-
setCompressTags
-
getChecksumType
-
getBytesPerChecksum
-
getBlocksize
-
getFileCreateTime
-
getDataBlockEncoding
-
getIndexBlockEncoding
-
getEncryptionContext
-
setEncryptionContext
-
getHFileName
-
getColumnFamily
-
getTableName
-
getCellComparator
-
heapSize
HeapSize implementation. NOTE : The heap size should be altered when new state variable are added. -
clone
-
toString
-