org.apache.hadoop.hbase.io.hfile
Class HFileContext

java.lang.Object
  extended by 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.


Field Summary
static int DEFAULT_BYTES_PER_CHECKSUM
           
static ChecksumType DEFAULT_CHECKSUM_TYPE
           
 
Constructor Summary
HFileContext()
           
HFileContext(boolean useHBaseChecksum, boolean includesMvcc, boolean includesTags, Compression.Algorithm compressAlgo, boolean compressTags, ChecksumType checksumType, int bytesPerChecksum, int blockSize, DataBlockEncoding encoding, Encryption.Context cryptoContext)
           
HFileContext(HFileContext context)
          Copy constructor
 
Method Summary
 HFileContext clone()
           
 int getBlocksize()
           
 int getBytesPerChecksum()
           
 ChecksumType getChecksumType()
           
 Compression.Algorithm getCompression()
           
 DataBlockEncoding getDataBlockEncoding()
           
 Encryption.Context getEncryptionContext()
           
 long heapSize()
          HeapSize implementation NOTE : The heapsize should be altered as and when new state variable are added
 boolean isCompressedOrEncrypted()
           
 boolean isCompressTags()
           
 boolean isIncludesMvcc()
           
 boolean isIncludesTags()
           
 boolean isUseHBaseChecksum()
           
 void setCompression(Compression.Algorithm compressAlgo)
           
 void setCompressTags(boolean compressTags)
           
 void setDataBlockEncoding(DataBlockEncoding encoding)
           
 void setEncryptionContext(Encryption.Context cryptoContext)
           
 void setIncludesMvcc(boolean includesMvcc)
           
 void setIncludesTags(boolean includesTags)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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)
Method Detail

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.