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
Modifier and TypeFieldDescriptionprivate int
Number of uncompressed bytes we allow per block.private int
the number of bytes per checksum valueprivate CellComparator
private ChecksumType
the checksum typeprivate byte[]
private Compression.Algorithm
Compression algorithm usedprivate boolean
Whether tags to be compressed or notprivate Encryption.Context
Encryption algorithm and key usedprivate static final int
private DataBlockEncoding
private long
static final long
private String
private boolean
Whether mvcc is to be included in the Read/Writeprivate boolean
Whether tags are to be included in the Read/Writeprivate IndexBlockEncoding
private byte[]
private boolean
Whether checksum is enabled or not -
Constructor Summary
ConstructorDescriptionHFileContext
(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()
int
int
byte[]
long
byte[]
long
heapSize()
HeapSize implementation.boolean
Returns true when on-disk blocks are compressed, and/or encrypted; false otherwise.boolean
boolean
boolean
boolean
void
setCompressTags
(boolean compressTags) void
setEncryptionContext
(Encryption.Context cryptoContext) void
setFileCreateTime
(long fileCreateTime) void
setIncludesMvcc
(boolean includesMvcc) void
setIncludesTags
(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
-