Package org.apache.hadoop.hbase.client
Interface ColumnFamilyDescriptor
- All Known Implementing Classes:
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
An ColumnFamilyDescriptor contains information about a column family such as the number of
versions, compression settings, etc. It is used as input when creating a table or adding a
column. To construct a new instance, use the
ColumnFamilyDescriptorBuilder methods- Since:
- 2.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<ColumnFamilyDescriptor>static final Comparator<ColumnFamilyDescriptor>static final Bytes -
Method Summary
Modifier and TypeMethodDescriptionintReturns The storefile/hfile blocksize for this column family.Returns bloom filter type used for new StoreFiles in ColumnFamilyReturns Compression type setting.Returns Compression type setting.Returns an unmodifiable map.Returns accessing the configuration value by key.Returns the data block encoding algorithm used in block cache and optionally on diskshortReturns replication factor set for this CFbyte[]Returns Return the raw crypto key attribute for the family, or null if not setReturns Return the encryption algorithm in use by this familyReturn the index block encoding algorithm used in block cache and optionally on diskReturns in-memory compaction policy if set for the cf.Returns return the KeepDeletedCellsReturns Compression type setting for major compactions.intReturns maximum number of versionsReturns Compression type setting for minor compactions.intReturns The minimum number of versions to keep.Get the mob compact partition policy for this familylongGets the mob threshold of the family.byte[]getName()Returns a copy of Name of this column familyReturns Name of this column familyintgetScope()Returns the scope tagNot usingenumhere because HDFS is not usingenumfor storage policy, see org.apache.hadoop.hdfs.server.blockmanagement.BlockStoragePolicySuite for more details.intReturns Time-to-live of cell contents, in seconds.byte[]getValue(byte[] key) Get a configuration value.Get a configuration value.Get a configuration value.Get all configuration values.booleanReturns True if hfile DATA type blocks should be cached (You cannot disable caching of INDEX and BLOOM type blocks).booleanReturns true if we should cache bloomfilter blocks on writebooleanReturns true if we should cache data blocks on writebooleanReturns true if we should cache index blocks on writebooleanReturns Whether KV tags should be compressed along with DataBlockEncoding.booleanReturns true if we should evict cached blocks from the blockcache on closebooleanReturns True if we are to favor keeping all values for this column family in the HRegionServer cache.booleanGets whether the mob is enabled for the family.booleanBy default, HBase only consider timestamp in versions.booleanReturns true if we should prefetch blocks into the blockcache on openReturns Column family descriptor with only the customized attributes.
-
Field Details
-
COMPARATOR
-
REPLICATION_SCOPE_BYTES
-
COMPARATOR_IGNORE_REPLICATION
-
-
Method Details
-
getBlocksize
int getBlocksize()Returns The storefile/hfile blocksize for this column family. -
getBloomFilterType
Returns bloom filter type used for new StoreFiles in ColumnFamily -
getCompactionCompressionType
Returns Compression type setting. -
getMajorCompactionCompressionType
Returns Compression type setting for major compactions. -
getMinorCompactionCompressionType
Returns Compression type setting for minor compactions. -
getCompressionType
Returns Compression type setting. -
getConfiguration
Returns an unmodifiable map. -
getConfigurationValue
Returns accessing the configuration value by key. -
getDFSReplication
short getDFSReplication()Returns replication factor set for this CF -
getDataBlockEncoding
Returns the data block encoding algorithm used in block cache and optionally on disk -
getIndexBlockEncoding
Return the index block encoding algorithm used in block cache and optionally on disk -
getEncryptionKey
byte[] getEncryptionKey()Returns Return the raw crypto key attribute for the family, or null if not set -
getEncryptionType
Returns Return the encryption algorithm in use by this family -
getInMemoryCompaction
Returns in-memory compaction policy if set for the cf. Returns null if no policy is set for for this column family -
getKeepDeletedCells
Returns return the KeepDeletedCells -
getMaxVersions
int getMaxVersions()Returns maximum number of versions -
getMinVersions
int getMinVersions()Returns The minimum number of versions to keep. -
getMobCompactPartitionPolicy
Get the mob compact partition policy for this family -
getMobThreshold
long getMobThreshold()Gets the mob threshold of the family. If the size of a cell value is larger than this threshold, it's regarded as a mob. The default threshold is 1024*100(100K)B.- Returns:
- The mob threshold.
-
getName
byte[] getName()Returns a copy of Name of this column family -
getNameAsString
Returns Name of this column family -
getScope
int getScope()Returns the scope tag -
getStoragePolicy
Not usingenumhere because HDFS is not usingenumfor storage policy, see org.apache.hadoop.hdfs.server.blockmanagement.BlockStoragePolicySuite for more details.- Returns:
- Return the storage policy in use by this family
-
getTimeToLive
int getTimeToLive()Returns Time-to-live of cell contents, in seconds. -
getValue
Get a configuration value.- Parameters:
key- The key.- Returns:
- A clone value. Null if no mapping for the key
-
getValue
Get a configuration value.- Parameters:
key- The key.- Returns:
- A clone value. Null if no mapping for the key
-
getValue
Get a configuration value.- Parameters:
key- The key.- Returns:
- A clone value. Null if no mapping for the key
-
getValues
Get all configuration values. It clone all bytes of all elements.- Returns:
- All values
-
isBlockCacheEnabled
boolean isBlockCacheEnabled()Returns True if hfile DATA type blocks should be cached (You cannot disable caching of INDEX and BLOOM type blocks). -
isCacheBloomsOnWrite
boolean isCacheBloomsOnWrite()Returns true if we should cache bloomfilter blocks on write -
isCacheDataOnWrite
boolean isCacheDataOnWrite()Returns true if we should cache data blocks on write -
isCacheIndexesOnWrite
boolean isCacheIndexesOnWrite()Returns true if we should cache index blocks on write -
isCompressTags
boolean isCompressTags()Returns Whether KV tags should be compressed along with DataBlockEncoding. When no DataBlockEncoding is been used, this is having no effect. -
isEvictBlocksOnClose
boolean isEvictBlocksOnClose()Returns true if we should evict cached blocks from the blockcache on close -
isInMemory
boolean isInMemory()Returns True if we are to favor keeping all values for this column family in the HRegionServer cache. -
isMobEnabled
boolean isMobEnabled()Gets whether the mob is enabled for the family.- Returns:
- True if the mob is enabled for the family.
-
isPrefetchBlocksOnOpen
boolean isPrefetchBlocksOnOpen()Returns true if we should prefetch blocks into the blockcache on open -
toStringCustomizedValues
Returns Column family descriptor with only the customized attributes. -
isNewVersionBehavior
boolean isNewVersionBehavior()By default, HBase only consider timestamp in versions. So a previous Delete with higher ts will mask a later Put with lower ts. Set this to true to enable new semantics of versions. We will also consider mvcc in versions. See HBASE-15968 for details.
-