Package org.apache.hadoop.hbase.client
Class ColumnFamilyDescriptorBuilder
java.lang.Object
org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn ModifyableFamilyDescriptor contains information about a column family such as the number of versions, compression settings, etc. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey for the BLOCKCACHE attribute.private static final Bytesstatic final StringSize of storefile/hfile 'blocks'.private static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesprivate static final bytestatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final booleanDefault setting for whether to use a block cache or not.static final intDefault size of blocks in files stored to the filesytem (hfiles).static final BloomTypeDefault setting for whether or not to use bloomfilters.static final booleanDefault setting for whether to cache bloom filter blocks on write if block caching is enabled.static final booleanDefault setting for whether to cache data blocks on write if block caching is enabled.static final booleanDefault setting for whether to cache index blocks on write if block caching is enabled.static final booleanDefault compress tags along with any type of DataBlockEncoding.static final Compression.AlgorithmDefault compression type.static final DataBlockEncodingDefault data block encoding algorithm.static final shortstatic final booleanDefault setting for whether to evict cached blocks from the blockcache on close.static final booleanDefault setting for whether to try and serve this column family from memory or not.static final IndexBlockEncodingDefault index block encoding algorithm.static final KeepDeletedCellsDefault setting for preventing deleted from being collected immediately.static final intDefault number of versions of a record to keep.static final intDefault is not to keep a minimum of versions.private static final booleanstatic final MobCompactPartitionPolicystatic final longstatic final booleanstatic final booleanstatic final intDefault scope.static final intDefault time to live of cell contents.static final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final StringRetain all cells across flushes and compactions even if they fall behind a delete tombstone.private static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytesstatic final StringKey for the PREFETCH_BLOCKS_ON_OPEN attribute.private static final Bytesstatic final Stringstatic final Stringprivate static final Bytesstatic final Stringprivate static final Bytes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()static ColumnFamilyDescriptorcopy(ColumnFamilyDescriptor desc) static PrettyPrinter.Unitstatic byte[]isLegalColumnFamilyName(byte[] b) Check if the column family name is legal.newBuilder(byte[] name) static ColumnFamilyDescriptorof(byte[] name) static ColumnFamilyDescriptorstatic ColumnFamilyDescriptorparseFrom(byte[] pbBytes) setBlockCacheEnabled(boolean value) setBlocksize(int value) setBlocksize(String value) setBloomFilterType(BloomType value) setCacheBloomsOnWrite(boolean value) setCacheDataOnWrite(boolean value) setCacheIndexesOnWrite(boolean value) setCompressTags(boolean value) setConfiguration(String key, String value) setDFSReplication(short value) setEncryptionKey(byte[] value) setEncryptionType(String value) setEvictBlocksOnClose(boolean value) setInMemory(boolean value) setMaxVersions(int value) setMinVersions(int value) setMobEnabled(boolean value) setMobThreshold(long value) setNewVersionBehavior(boolean value) setPrefetchBlocksOnOpen(boolean value) setScope(int value) setStoragePolicy(String value) setTimeToLive(int value) setTimeToLive(String value) setValue(byte[] key, byte[] value) setVersionsWithTimeToLive(int retentionInterval, int versionAfterInterval) static byte[]Serialize the table descriptor to a byte array.
-
Field Details
-
COLUMN_DESCRIPTOR_VERSION
- See Also:
-
IN_MEMORY_COMPACTION
- See Also:
-
IN_MEMORY_COMPACTION_BYTES
-
IN_MEMORY
- See Also:
-
IN_MEMORY_BYTES
-
COMPRESSION
- See Also:
-
COMPRESSION_BYTES
-
COMPRESSION_COMPACT
- See Also:
-
COMPRESSION_COMPACT_BYTES
-
COMPRESSION_COMPACT_MAJOR
- See Also:
-
COMPRESSION_COMPACT_MAJOR_BYTES
-
COMPRESSION_COMPACT_MINOR
- See Also:
-
COMPRESSION_COMPACT_MINOR_BYTES
-
DATA_BLOCK_ENCODING
- See Also:
-
DATA_BLOCK_ENCODING_BYTES
-
INDEX_BLOCK_ENCODING
- See Also:
-
INDEX_BLOCK_ENCODING_BYTES
-
BLOCKCACHE
Key for the BLOCKCACHE attribute. A more exact name would be CACHE_DATA_ON_READ because this flag sets whether or not we cache DATA blocks. We always cache INDEX and BLOOM blocks; caching these blocks cannot be disabled.- See Also:
-
BLOCKCACHE_BYTES
-
CACHE_DATA_ON_WRITE
- See Also:
-
CACHE_DATA_ON_WRITE_BYTES
-
CACHE_INDEX_ON_WRITE
- See Also:
-
CACHE_INDEX_ON_WRITE_BYTES
-
CACHE_BLOOMS_ON_WRITE
- See Also:
-
CACHE_BLOOMS_ON_WRITE_BYTES
-
EVICT_BLOCKS_ON_CLOSE
- See Also:
-
EVICT_BLOCKS_ON_CLOSE_BYTES
-
PREFETCH_BLOCKS_ON_OPEN
Key for the PREFETCH_BLOCKS_ON_OPEN attribute. If set, all INDEX, BLOOM, and DATA blocks of HFiles belonging to this family will be loaded into the cache as soon as the file is opened. These loads will not count as cache misses.- See Also:
-
PREFETCH_BLOCKS_ON_OPEN_BYTES
-
BLOCKSIZE
Size of storefile/hfile 'blocks'. Default isDEFAULT_BLOCKSIZE. Use smaller block sizes for faster random-access at expense of larger indices (more memory consumption). Note that this is a soft limit and that blocks have overhead (metadata, CRCs) so blocks will tend to be the size specified here and then some; i.e. don't expect that setting BLOCKSIZE=4k means hbase data will align with an SSDs 4k page accesses (TODO).- See Also:
-
BLOCKSIZE_BYTES
-
TTL
- See Also:
-
TTL_BYTES
-
BLOOMFILTER
- See Also:
-
BLOOMFILTER_BYTES
-
REPLICATION_SCOPE
- See Also:
-
MAX_VERSIONS
- See Also:
-
MAX_VERSIONS_BYTES
-
MIN_VERSIONS
- See Also:
-
MIN_VERSIONS_BYTES
-
KEEP_DELETED_CELLS
Retain all cells across flushes and compactions even if they fall behind a delete tombstone. To see all retained cells, do a 'raw' scan; see Scan#setRaw or pass RAW => true attribute in the shell.- See Also:
-
KEEP_DELETED_CELLS_BYTES
-
COMPRESS_TAGS
- See Also:
-
COMPRESS_TAGS_BYTES
-
ENCRYPTION
- See Also:
-
ENCRYPTION_BYTES
-
ENCRYPTION_KEY
- See Also:
-
ENCRYPTION_KEY_BYTES
-
DEFAULT_MOB
- See Also:
-
IS_MOB
- See Also:
-
IS_MOB_BYTES
-
MOB_THRESHOLD
- See Also:
-
MOB_THRESHOLD_BYTES
-
DEFAULT_MOB_THRESHOLD
- See Also:
-
MOB_COMPACT_PARTITION_POLICY
- See Also:
-
MOB_COMPACT_PARTITION_POLICY_BYTES
-
DEFAULT_MOB_COMPACT_PARTITION_POLICY
-
DFS_REPLICATION
- See Also:
-
DFS_REPLICATION_BYTES
-
DEFAULT_DFS_REPLICATION
- See Also:
-
STORAGE_POLICY
- See Also:
-
STORAGE_POLICY_BYTES
-
NEW_VERSION_BEHAVIOR
- See Also:
-
NEW_VERSION_BEHAVIOR_BYTES
-
DEFAULT_NEW_VERSION_BEHAVIOR
- See Also:
-
DEFAULT_COMPRESSION
Default compression type. -
DEFAULT_DATA_BLOCK_ENCODING
Default data block encoding algorithm. -
DEFAULT_INDEX_BLOCK_ENCODING
Default index block encoding algorithm. -
DEFAULT_MAX_VERSIONS
Default number of versions of a record to keep.- See Also:
-
DEFAULT_MIN_VERSIONS
Default is not to keep a minimum of versions.- See Also:
-
DEFAULT_IN_MEMORY
Default setting for whether to try and serve this column family from memory or not.- See Also:
-
DEFAULT_KEEP_DELETED
Default setting for preventing deleted from being collected immediately. -
DEFAULT_BLOCKCACHE
Default setting for whether to use a block cache or not.- See Also:
-
DEFAULT_CACHE_DATA_ON_WRITE
Default setting for whether to cache data blocks on write if block caching is enabled.- See Also:
-
DEFAULT_CACHE_INDEX_ON_WRITE
Default setting for whether to cache index blocks on write if block caching is enabled.- See Also:
-
DEFAULT_BLOCKSIZE
Default size of blocks in files stored to the filesytem (hfiles).- See Also:
-
DEFAULT_BLOOMFILTER
Default setting for whether or not to use bloomfilters. -
DEFAULT_CACHE_BLOOMS_ON_WRITE
Default setting for whether to cache bloom filter blocks on write if block caching is enabled.- See Also:
-
DEFAULT_TTL
Default time to live of cell contents.- See Also:
-
DEFAULT_REPLICATION_SCOPE
Default scope.- See Also:
-
DEFAULT_EVICT_BLOCKS_ON_CLOSE
Default setting for whether to evict cached blocks from the blockcache on close.- See Also:
-
DEFAULT_COMPRESS_TAGS
Default compress tags along with any type of DataBlockEncoding.- See Also:
-
DEFAULT_PREFETCH_BLOCKS_ON_OPEN
- See Also:
-
DEFAULT_VALUES
-
RESERVED_KEYWORDS
-
desc
-
-
Constructor Details
-
ColumnFamilyDescriptorBuilder
-
ColumnFamilyDescriptorBuilder
-
-
Method Details
-
getDefaultValuesBytes
-
getDefaultValues
-
getUnit
-
isLegalColumnFamilyName
Check if the column family name is legal.- Parameters:
b- Family name.- Returns:
b- Throws:
IllegalArgumentException- If not null and not a legitimate family name: i.e. 'printable' and ends in a ':' (Null passes are allowed becausebcan be null when deserializing). Cannot start with a '.' either. Also Family can not be an empty value or equal "recovered.edits".
-
parseFrom
- Throws:
DeserializationException
-
newBuilder
-
newBuilder
-
copy
-
of
-
of
-
toByteArray
Serialize the table descriptor to a byte array.- Parameters:
desc- The table descriptor to serialize- Returns:
- This instance serialized with pb with pb magic prefix
-
build
-
removeConfiguration
-
getNameAsString
-
setBlockCacheEnabled
-
setBlocksize
-
setBlocksize
- Throws:
HBaseException
-
setBloomFilterType
-
setCacheBloomsOnWrite
-
setCacheDataOnWrite
-
setCacheIndexesOnWrite
-
setCompactionCompressionType
-
setMajorCompactionCompressionType
-
setMinorCompactionCompressionType
-
setCompressTags
-
setCompressionType
-
getCompressionType
-
setConfiguration
-
setDFSReplication
-
setDataBlockEncoding
-
setIndexBlockEncoding
-
setEncryptionKey
-
setEncryptionType
-
setEvictBlocksOnClose
-
setInMemory
-
setInMemoryCompaction
-
setKeepDeletedCells
-
setMaxVersions
-
setMinVersions
-
setMobCompactPartitionPolicy
-
setMobEnabled
-
setMobThreshold
-
setPrefetchBlocksOnOpen
-
setScope
-
setStoragePolicy
-
setTimeToLive
-
setTimeToLive
- Throws:
HBaseException
-
setNewVersionBehavior
-
setValue
-
setValue
-
setValue
-
setVersionsWithTimeToLive
public ColumnFamilyDescriptorBuilder setVersionsWithTimeToLive(int retentionInterval, int versionAfterInterval)
-