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 usedprivate 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, 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[]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 -
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, 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
-
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
-