org.apache.hadoop.hbase.io.hfile
Class HFileContext
java.lang.Object
org.apache.hadoop.hbase.io.hfile.HFileContext
- All Implemented Interfaces:
- Cloneable, HeapSize
@InterfaceAudience.Private
public class HFileContext
- extends Object
- implements HeapSize, Cloneable
This carries the information on some of the meta data about the HFile. This
meta data is used across the HFileWriter/Readers and the HFileBlocks.
This helps to add new information to the HFile.
DEFAULT_BYTES_PER_CHECKSUM
public static final int DEFAULT_BYTES_PER_CHECKSUM
- See Also:
- Constant Field Values
DEFAULT_CHECKSUM_TYPE
public static final ChecksumType DEFAULT_CHECKSUM_TYPE
HFileContext
public HFileContext()
HFileContext
public HFileContext(HFileContext context)
- Copy constructor
- Parameters:
context
-
HFileContext
public HFileContext(boolean useHBaseChecksum,
boolean includesMvcc,
boolean includesTags,
Compression.Algorithm compressAlgo,
boolean compressTags,
ChecksumType checksumType,
int bytesPerChecksum,
int blockSize,
DataBlockEncoding encoding,
Encryption.Context cryptoContext)
isCompressedOrEncrypted
public boolean isCompressedOrEncrypted()
- Returns:
- true when on-disk blocks from this file are compressed, and/or encrypted;
false otherwise.
getCompression
public Compression.Algorithm getCompression()
setCompression
public void setCompression(Compression.Algorithm compressAlgo)
isUseHBaseChecksum
public boolean isUseHBaseChecksum()
isIncludesMvcc
public boolean isIncludesMvcc()
setIncludesMvcc
public void setIncludesMvcc(boolean includesMvcc)
isIncludesTags
public boolean isIncludesTags()
setIncludesTags
public void setIncludesTags(boolean includesTags)
isCompressTags
public boolean isCompressTags()
setCompressTags
public void setCompressTags(boolean compressTags)
getChecksumType
public ChecksumType getChecksumType()
getBytesPerChecksum
public int getBytesPerChecksum()
getBlocksize
public int getBlocksize()
getDataBlockEncoding
public DataBlockEncoding getDataBlockEncoding()
setDataBlockEncoding
public void setDataBlockEncoding(DataBlockEncoding encoding)
getEncryptionContext
public Encryption.Context getEncryptionContext()
setEncryptionContext
public void setEncryptionContext(Encryption.Context cryptoContext)
heapSize
public long heapSize()
- HeapSize implementation
NOTE : The heapsize should be altered as and when new state variable are added
- Specified by:
heapSize
in interface HeapSize
- Returns:
- heap size of the HFileContext
clone
public HFileContext clone()
- Overrides:
clone
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2015 The Apache Software Foundation. All Rights Reserved.