Package org.apache.hadoop.hbase.client
Class ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
java.lang.Object
org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
- All Implemented Interfaces:
Comparable<ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor>
,ColumnFamilyDescriptor
- Enclosing class:
- ColumnFamilyDescriptorBuilder
@Private
public static class ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
extends Object
implements ColumnFamilyDescriptor, Comparable<ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor>
An ModifyableFamilyDescriptor 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. TODO: make this package-private after removing the HColumnDescriptor
-
Field Summary
Modifier and TypeFieldDescriptionA map which holds the configuration specific to the column family.private final byte[]
Fields inherited from interface org.apache.hadoop.hbase.client.ColumnFamilyDescriptor
COMPARATOR, COMPARATOR_IGNORE_REPLICATION, REPLICATION_SCOPE_BYTES
-
Constructor Summary
ModifierConstructorDescriptionModifyableColumnFamilyDescriptor
(byte[] name) Construct a column descriptor specifying only the family name The other attributes are defaulted.private
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
Returns 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 diskshort
Returns 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.int
Returns maximum number of versionsReturns Compression type setting for minor compactions.int
Returns The minimum number of versions to keep.Get the mob compact partition policy for this familylong
Gets the mob threshold of the family.byte[]
getName()
Returns a copy of Name of this column familyReturns Name of this column familyprivate <T> T
getOrDefault
(Bytes key, Function<byte[], T> function, T defaultValue) int
getScope()
Returns the scope tagNot usingenum
here because HDFS is not usingenum
for storage policy, see org.apache.hadoop.hdfs.server.blockmanagement.BlockStoragePolicySuite for more details.private <T> T
getStringOrDefault
(Bytes key, Function<String, T> function, T defaultValue) int
Returns 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.private StringBuilder
getValues
(boolean printDefaults) int
hashCode()
boolean
Returns True if hfile DATA type blocks should be cached (You cannot disable caching of INDEX and BLOOM type blocks).boolean
Returns true if we should cache bloomfilter blocks on writeboolean
Returns true if we should cache data blocks on writeboolean
Returns true if we should cache index blocks on writeboolean
Returns Whether KV tags should be compressed along with DataBlockEncoding.boolean
Returns true if we should evict cached blocks from the blockcache on closeboolean
Returns True if we are to favor keeping all values for this column family in the HRegionServer cache.boolean
Gets whether the mob is enabled for the family.boolean
By default, HBase only consider timestamp in versions.boolean
Returns true if we should prefetch blocks into the blockcache on openprivate static ColumnFamilyDescriptor
parseFrom
(byte[] bytes) Parse the serialized representation of aColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
Remove a configuration setting represented by the key from theconfiguration
map.removeValue
(Bytes key) setBlockCacheEnabled
(boolean blockCacheEnabled) Set the blockCacheEnabled flagsetBlocksize
(int s) setBlocksize
(String blocksize) setCacheBloomsOnWrite
(boolean value) Set the setCacheBloomsOnWrite flag.setCacheDataOnWrite
(boolean value) Set the setCacheDataOnWrite flagsetCacheIndexesOnWrite
(boolean value) Set the setCacheIndexesOnWrite flagCompression types supported in hbase.Compression types supported in hbase.setCompressTags
(boolean compressTags) Set whether the tags should be compressed along with DataBlockEncoding.setConfiguration
(String key, String value) Setter for storing a configuration setting inconfiguration
map.Set data block encoding algorithm used in block cache.setDFSReplication
(short replication) Set the replication factor to hfile(s) belonging to this familysetEncryptionKey
(byte[] keyBytes) Set the raw crypto key attribute for the familysetEncryptionType
(String algorithm) Set the encryption algorithm for use with this familysetEvictBlocksOnClose
(boolean value) Set the setEvictBlocksOnClose flag.Set index block encoding algorithm used in block cache.setInMemory
(boolean inMemory) Set the inMemory flagsetInMemoryCompaction
(MemoryCompactionPolicy inMemoryCompaction) setKeepDeletedCells
(KeepDeletedCells keepDeletedCells) setMaxVersions
(int maxVersions) Set the maximum number of versions to retain.setMinVersions
(int minVersions) Set minimum versions to retain.Set the mob compact partition policy for the family.setMobEnabled
(boolean isMobEnabled) Enables the mob for the family.setMobThreshold
(long threshold) Sets the mob threshold of the family.setNewVersionBehavior
(boolean newVersionBehavior) setPrefetchBlocksOnOpen
(boolean value) Set the setPrefetchBlocksOnOpen flagsetScope
(int scope) setStoragePolicy
(String policy) Set the storage policy for use with this familysetTimeToLive
(int timeToLive) Set the time to livesetTimeToLive
(String timeToLive) Set the time to livesetValue
(byte[] key, byte[] value) setVersions
(int minVersions, int maxVersions) Set minimum and maximum versions to keep.setVersionsWithTimeToLive
(int retentionInterval, int versionAfterInterval) Retain all versions for a given TTL(retentionInterval), and then only a specific number of versions(versionAfterInterval) after that interval elapses.private byte[]
Returns This instance serialized with pb with pb magic prefixprivate static <T> Bytes
toBytesOrNull
(T t, Function<T, byte[]> f) toString()
Returns Column family descriptor with only the customized attributes.
-
Field Details
-
name
-
values
-
configuration
A map which holds the configuration specific to the column family. The keys of the map have the same names as config keys and override the defaults with cf-specific settings. Example usage may be for compactions, etc.
-
-
Constructor Details
-
ModifyableColumnFamilyDescriptor
Construct a column descriptor specifying only the family name The other attributes are defaulted.- Parameters:
name
- Column family name. Must be 'printable' -- digit or letter -- and may not contain a:
TODO: make this private after the HCD is removed.
-
ModifyableColumnFamilyDescriptor
Constructor. Makes a deep copy of the supplied descriptor. TODO: make this private after the HCD is removed.- Parameters:
desc
- The descriptor.
-
ModifyableColumnFamilyDescriptor
-
-
Method Details
-
getName
Description copied from interface:ColumnFamilyDescriptor
Returns a copy of Name of this column family- Specified by:
getName
in interfaceColumnFamilyDescriptor
-
getNameAsString
Description copied from interface:ColumnFamilyDescriptor
Returns Name of this column family- Specified by:
getNameAsString
in interfaceColumnFamilyDescriptor
-
getValue
Description copied from interface:ColumnFamilyDescriptor
Get a configuration value.- Specified by:
getValue
in interfaceColumnFamilyDescriptor
- Parameters:
key
- The key.- Returns:
- A clone value. Null if no mapping for the key
-
getValue
Description copied from interface:ColumnFamilyDescriptor
Get a configuration value.- Specified by:
getValue
in interfaceColumnFamilyDescriptor
- Parameters:
key
- The key.- Returns:
- A clone value. Null if no mapping for the key
-
getValue
Description copied from interface:ColumnFamilyDescriptor
Get a configuration value.- Specified by:
getValue
in interfaceColumnFamilyDescriptor
- Parameters:
key
- The key.- Returns:
- A clone value. Null if no mapping for the key
-
getValues
Description copied from interface:ColumnFamilyDescriptor
Get all configuration values. It clone all bytes of all elements.- Specified by:
getValues
in interfaceColumnFamilyDescriptor
- Returns:
- All values
-
setValue
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(byte[] key, byte[] value) -
setValue
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(String key, String value) -
setValue
private ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(Bytes key, String value) -
setValue
private ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(Bytes key, Bytes value) -
removeValue
-
toBytesOrNull
-
getStringOrDefault
-
getOrDefault
-
getMaxVersions
Description copied from interface:ColumnFamilyDescriptor
Returns maximum number of versions- Specified by:
getMaxVersions
in interfaceColumnFamilyDescriptor
-
setMaxVersions
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMaxVersions(int maxVersions) Set the maximum number of versions to retain.- Parameters:
maxVersions
- maximum number of versions- Returns:
- this (for chained invocation)
-
setVersions
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setVersions(int minVersions, int maxVersions) Set minimum and maximum versions to keep.- Parameters:
minVersions
- minimal number of versionsmaxVersions
- maximum number of versions- Returns:
- this (for chained invocation)
-
getBlocksize
Description copied from interface:ColumnFamilyDescriptor
Returns The storefile/hfile blocksize for this column family.- Specified by:
getBlocksize
in interfaceColumnFamilyDescriptor
-
setBlocksize
-
setBlocksize
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setBlocksize(String blocksize) throws HBaseException - Throws:
HBaseException
-
getCompressionType
Description copied from interface:ColumnFamilyDescriptor
Returns Compression type setting.- Specified by:
getCompressionType
in interfaceColumnFamilyDescriptor
-
setCompressionType
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCompressionType(Compression.Algorithm type) Compression types supported in hbase. LZO is not bundled as part of the hbase distribution. See LZO Compression for how to enable it.- Parameters:
type
- Compression type setting.- Returns:
- this (for chained invocation)
-
getDataBlockEncoding
Description copied from interface:ColumnFamilyDescriptor
Returns the data block encoding algorithm used in block cache and optionally on disk- Specified by:
getDataBlockEncoding
in interfaceColumnFamilyDescriptor
-
setDataBlockEncoding
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setDataBlockEncoding(DataBlockEncoding type) Set data block encoding algorithm used in block cache.- Parameters:
type
- What kind of data block encoding will be used.- Returns:
- this (for chained invocation)
-
getIndexBlockEncoding
Description copied from interface:ColumnFamilyDescriptor
Return the index block encoding algorithm used in block cache and optionally on disk- Specified by:
getIndexBlockEncoding
in interfaceColumnFamilyDescriptor
-
setIndexBlockEncoding
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setIndexBlockEncoding(IndexBlockEncoding type) Set index block encoding algorithm used in block cache.- Parameters:
type
- What kind of index block encoding will be used.- Returns:
- this (for chained invocation)
-
setCompressTags
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCompressTags(boolean compressTags) Set whether the tags should be compressed along with DataBlockEncoding. When no DataBlockEncoding is been used, this is having no effect.- Returns:
- this (for chained invocation)
-
isCompressTags
Description copied from interface:ColumnFamilyDescriptor
Returns Whether KV tags should be compressed along with DataBlockEncoding. When no DataBlockEncoding is been used, this is having no effect.- Specified by:
isCompressTags
in interfaceColumnFamilyDescriptor
-
getCompactionCompressionType
Description copied from interface:ColumnFamilyDescriptor
Returns Compression type setting.- Specified by:
getCompactionCompressionType
in interfaceColumnFamilyDescriptor
-
getMajorCompactionCompressionType
Description copied from interface:ColumnFamilyDescriptor
Returns Compression type setting for major compactions.- Specified by:
getMajorCompactionCompressionType
in interfaceColumnFamilyDescriptor
-
getMinorCompactionCompressionType
Description copied from interface:ColumnFamilyDescriptor
Returns Compression type setting for minor compactions.- Specified by:
getMinorCompactionCompressionType
in interfaceColumnFamilyDescriptor
-
setCompactionCompressionType
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCompactionCompressionType(Compression.Algorithm type) Compression types supported in hbase. LZO is not bundled as part of the hbase distribution. See LZO Compression for how to enable it.- Parameters:
type
- Compression type setting.- Returns:
- this (for chained invocation)
-
setMajorCompactionCompressionType
-
setMinorCompactionCompressionType
-
isInMemory
Description copied from interface:ColumnFamilyDescriptor
Returns True if we are to favor keeping all values for this column family in the HRegionServer cache.- Specified by:
isInMemory
in interfaceColumnFamilyDescriptor
-
setInMemory
Set the inMemory flag- Parameters:
inMemory
- True if we are to favor keeping all values for this column family in the HRegionServer cache- Returns:
- this (for chained invocation)
-
getInMemoryCompaction
Description copied from interface:ColumnFamilyDescriptor
Returns in-memory compaction policy if set for the cf. Returns null if no policy is set for for this column family- Specified by:
getInMemoryCompaction
in interfaceColumnFamilyDescriptor
-
setInMemoryCompaction
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setInMemoryCompaction(MemoryCompactionPolicy inMemoryCompaction) -
getKeepDeletedCells
Description copied from interface:ColumnFamilyDescriptor
Returns return the KeepDeletedCells- Specified by:
getKeepDeletedCells
in interfaceColumnFamilyDescriptor
-
setKeepDeletedCells
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setKeepDeletedCells(KeepDeletedCells keepDeletedCells) -
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.- Specified by:
isNewVersionBehavior
in interfaceColumnFamilyDescriptor
-
setNewVersionBehavior
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setNewVersionBehavior(boolean newVersionBehavior) -
getTimeToLive
Description copied from interface:ColumnFamilyDescriptor
Returns Time-to-live of cell contents, in seconds.- Specified by:
getTimeToLive
in interfaceColumnFamilyDescriptor
-
setTimeToLive
Set the time to live- Parameters:
timeToLive
- Time-to-live of cell contents, in seconds.- Returns:
- this (for chained invocation)
-
setTimeToLive
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setTimeToLive(String timeToLive) throws HBaseException Set the time to live- Parameters:
timeToLive
- Time-to-live of cell contents, in seconds.- Returns:
- this (for chained invocation)
- Throws:
HBaseException
- exception
-
getMinVersions
Description copied from interface:ColumnFamilyDescriptor
Returns The minimum number of versions to keep.- Specified by:
getMinVersions
in interfaceColumnFamilyDescriptor
-
setMinVersions
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMinVersions(int minVersions) Set minimum versions to retain.- Parameters:
minVersions
- The minimum number of versions to keep. (used when timeToLive is set)- Returns:
- this (for chained invocation)
-
setVersionsWithTimeToLive
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setVersionsWithTimeToLive(int retentionInterval, int versionAfterInterval) Retain all versions for a given TTL(retentionInterval), and then only a specific number of versions(versionAfterInterval) after that interval elapses.- Parameters:
retentionInterval
- Retain all versions for this intervalversionAfterInterval
- Retain no of versions to retain after retentionInterval- Returns:
- this (for chained invocation)
-
isBlockCacheEnabled
Description copied from interface:ColumnFamilyDescriptor
Returns True if hfile DATA type blocks should be cached (You cannot disable caching of INDEX and BLOOM type blocks).- Specified by:
isBlockCacheEnabled
in interfaceColumnFamilyDescriptor
-
setBlockCacheEnabled
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setBlockCacheEnabled(boolean blockCacheEnabled) Set the blockCacheEnabled flag- Parameters:
blockCacheEnabled
- True if hfile DATA type blocks should be cached (We always cache INDEX and BLOOM blocks; you cannot turn this off).- Returns:
- this (for chained invocation)
-
getBloomFilterType
Description copied from interface:ColumnFamilyDescriptor
Returns bloom filter type used for new StoreFiles in ColumnFamily- Specified by:
getBloomFilterType
in interfaceColumnFamilyDescriptor
-
setBloomFilterType
-
getScope
Description copied from interface:ColumnFamilyDescriptor
Returns the scope tag- Specified by:
getScope
in interfaceColumnFamilyDescriptor
-
setScope
-
isCacheDataOnWrite
Description copied from interface:ColumnFamilyDescriptor
Returns true if we should cache data blocks on write- Specified by:
isCacheDataOnWrite
in interfaceColumnFamilyDescriptor
-
setCacheDataOnWrite
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCacheDataOnWrite(boolean value) Set the setCacheDataOnWrite flag- Parameters:
value
- true if we should cache data blocks on write- Returns:
- this (for chained invocation)
-
isCacheIndexesOnWrite
Description copied from interface:ColumnFamilyDescriptor
Returns true if we should cache index blocks on write- Specified by:
isCacheIndexesOnWrite
in interfaceColumnFamilyDescriptor
-
setCacheIndexesOnWrite
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCacheIndexesOnWrite(boolean value) Set the setCacheIndexesOnWrite flag- Parameters:
value
- true if we should cache index blocks on write- Returns:
- this (for chained invocation)
-
isCacheBloomsOnWrite
Description copied from interface:ColumnFamilyDescriptor
Returns true if we should cache bloomfilter blocks on write- Specified by:
isCacheBloomsOnWrite
in interfaceColumnFamilyDescriptor
-
setCacheBloomsOnWrite
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCacheBloomsOnWrite(boolean value) Set the setCacheBloomsOnWrite flag.- Parameters:
value
- true if we should cache bloomfilter blocks on write- Returns:
- this (for chained invocation)
-
isEvictBlocksOnClose
Description copied from interface:ColumnFamilyDescriptor
Returns true if we should evict cached blocks from the blockcache on close- Specified by:
isEvictBlocksOnClose
in interfaceColumnFamilyDescriptor
-
setEvictBlocksOnClose
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setEvictBlocksOnClose(boolean value) Set the setEvictBlocksOnClose flag.- Parameters:
value
- true if we should evict cached blocks from the blockcache on close- Returns:
- this (for chained invocation)
-
isPrefetchBlocksOnOpen
Description copied from interface:ColumnFamilyDescriptor
Returns true if we should prefetch blocks into the blockcache on open- Specified by:
isPrefetchBlocksOnOpen
in interfaceColumnFamilyDescriptor
-
setPrefetchBlocksOnOpen
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setPrefetchBlocksOnOpen(boolean value) Set the setPrefetchBlocksOnOpen flag- Parameters:
value
- true if we should prefetch blocks into the blockcache on open- Returns:
- this (for chained invocation)
-
toString
-
toStringCustomizedValues
Description copied from interface:ColumnFamilyDescriptor
Returns Column family descriptor with only the customized attributes.- Specified by:
toStringCustomizedValues
in interfaceColumnFamilyDescriptor
-
getValues
-
equals
-
hashCode
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor>
-
toByteArray
Returns This instance serialized with pb with pb magic prefix -
parseFrom
Parse the serialized representation of aColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
- Parameters:
bytes
- A pb serializedColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
instance with pb magic prefix- Returns:
- An instance of
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
made frombytes
- Throws:
DeserializationException
- See Also:
-
getConfigurationValue
Description copied from interface:ColumnFamilyDescriptor
Returns accessing the configuration value by key.- Specified by:
getConfigurationValue
in interfaceColumnFamilyDescriptor
-
getConfiguration
Description copied from interface:ColumnFamilyDescriptor
Returns an unmodifiable map.- Specified by:
getConfiguration
in interfaceColumnFamilyDescriptor
-
setConfiguration
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setConfiguration(String key, String value) Setter for storing a configuration setting inconfiguration
map.- Parameters:
key
- Config key. Same as XML config key e.g. hbase.something.or.other.value
- String value. If null, removes the configuration.- Returns:
- this (for chained invocation)
-
removeConfiguration
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor removeConfiguration(String key) Remove a configuration setting represented by the key from theconfiguration
map.- Returns:
- this (for chained invocation)
-
getEncryptionType
Description copied from interface:ColumnFamilyDescriptor
Returns Return the encryption algorithm in use by this family- Specified by:
getEncryptionType
in interfaceColumnFamilyDescriptor
-
setEncryptionType
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setEncryptionType(String algorithm) Set the encryption algorithm for use with this family- Returns:
- this (for chained invocation)
-
getEncryptionKey
Description copied from interface:ColumnFamilyDescriptor
Returns Return the raw crypto key attribute for the family, or null if not set- Specified by:
getEncryptionKey
in interfaceColumnFamilyDescriptor
-
setEncryptionKey
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setEncryptionKey(byte[] keyBytes) Set the raw crypto key attribute for the family- Returns:
- this (for chained invocation)
-
getMobThreshold
Description copied from interface:ColumnFamilyDescriptor
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.- Specified by:
getMobThreshold
in interfaceColumnFamilyDescriptor
- Returns:
- The mob threshold.
-
setMobThreshold
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMobThreshold(long threshold) Sets the mob threshold of the family.- Parameters:
threshold
- The mob threshold.- Returns:
- this (for chained invocation)
-
isMobEnabled
Description copied from interface:ColumnFamilyDescriptor
Gets whether the mob is enabled for the family.- Specified by:
isMobEnabled
in interfaceColumnFamilyDescriptor
- Returns:
- True if the mob is enabled for the family.
-
setMobEnabled
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMobEnabled(boolean isMobEnabled) Enables the mob for the family.- Parameters:
isMobEnabled
- Whether to enable the mob for the family.- Returns:
- this (for chained invocation)
-
getMobCompactPartitionPolicy
Description copied from interface:ColumnFamilyDescriptor
Get the mob compact partition policy for this family- Specified by:
getMobCompactPartitionPolicy
in interfaceColumnFamilyDescriptor
-
setMobCompactPartitionPolicy
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMobCompactPartitionPolicy(MobCompactPartitionPolicy policy) Set the mob compact partition policy for the family.- Parameters:
policy
- policy type- Returns:
- this (for chained invocation)
-
getDFSReplication
Description copied from interface:ColumnFamilyDescriptor
Returns replication factor set for this CF- Specified by:
getDFSReplication
in interfaceColumnFamilyDescriptor
-
setDFSReplication
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setDFSReplication(short replication) Set the replication factor to hfile(s) belonging to this family- Parameters:
replication
- number of replicas the blocks(s) belonging to this CF should have, orColumnFamilyDescriptorBuilder.DEFAULT_DFS_REPLICATION
for the default replication factor set in the filesystem- Returns:
- this (for chained invocation)
-
getStoragePolicy
Description copied from interface:ColumnFamilyDescriptor
Not usingenum
here because HDFS is not usingenum
for storage policy, see org.apache.hadoop.hdfs.server.blockmanagement.BlockStoragePolicySuite for more details.- Specified by:
getStoragePolicy
in interfaceColumnFamilyDescriptor
- Returns:
- Return the storage policy in use by this family
-
setStoragePolicy
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setStoragePolicy(String policy) Set the storage policy for use with this family- Parameters:
policy
- the policy to set, valid setting includes: "LAZY_PERSIST", "ALL_SSD", "ONE_SSD", "HOT", "WARM", "COLD"- Returns:
- this (for chained invocation)
-