Package org.apache.hadoop.hbase.client
Class ColumnFamilyDescriptorBuilder
java.lang.Object
org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An ModifyableFamilyDescriptor contains information about a column family such as the number of versions, compression settings, etc. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key for the BLOCKCACHE attribute.private static final Bytes
static final String
Size of storefile/hfile 'blocks'.private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
private static final byte
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final boolean
Default setting for whether to use a block cache or not.static final int
Default size of blocks in files stored to the filesytem (hfiles).static final BloomType
Default setting for whether or not to use bloomfilters.static final boolean
Default setting for whether to cache bloom filter blocks on write if block caching is enabled.static final boolean
Default setting for whether to cache data blocks on write if block caching is enabled.static final boolean
Default setting for whether to cache index blocks on write if block caching is enabled.static final boolean
Default compress tags along with any type of DataBlockEncoding.static final Compression.Algorithm
Default compression type.static final DataBlockEncoding
Default data block encoding algorithm.static final short
static final boolean
Default setting for whether to evict cached blocks from the blockcache on close.static final boolean
Default setting for whether to try and serve this column family from memory or not.static final IndexBlockEncoding
Default index block encoding algorithm.static final KeepDeletedCells
Default setting for preventing deleted from being collected immediately.static final int
Default number of versions of a record to keep.static final int
Default is not to keep a minimum of versions.private static final boolean
static final MobCompactPartitionPolicy
static final long
static final boolean
static final boolean
static final int
Default scope.static final int
Default time to live of cell contents.static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
Retain all cells across flushes and compactions even if they fall behind a delete tombstone.private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
private static final Bytes
static final String
Key for the PREFETCH_BLOCKS_ON_OPEN attribute.private static final Bytes
static final String
static final String
private static final Bytes
static final String
private static final Bytes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static ColumnFamilyDescriptor
copy
(ColumnFamilyDescriptor desc) static PrettyPrinter.Unit
static byte[]
isLegalColumnFamilyName
(byte[] b) Check if the column family name is legal.newBuilder
(byte[] name) static ColumnFamilyDescriptor
of
(byte[] name) static ColumnFamilyDescriptor
static ColumnFamilyDescriptor
parseFrom
(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 becauseb
can 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)
-