@InterfaceAudience.Private public static class ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor extends Object implements ColumnFamilyDescriptor, Comparable<ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor>
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
configuration
A map which holds the configuration specific to the column family.
|
private byte[] |
name |
private Map<Bytes,Bytes> |
values |
COMPARATOR, COMPARATOR_IGNORE_REPLICATION, REPLICATION_SCOPE_BYTES
Modifier | Constructor and Description |
---|---|
|
ModifyableColumnFamilyDescriptor(byte[] name)
Construct a column descriptor specifying only the family name The other attributes are
defaulted.
|
private |
ModifyableColumnFamilyDescriptor(byte[] name,
Map<Bytes,Bytes> values,
Map<String,String> config) |
|
ModifyableColumnFamilyDescriptor(ColumnFamilyDescriptor desc)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor other) |
boolean |
equals(Object obj) |
int |
getBlocksize()
Returns The storefile/hfile blocksize for this column family.
|
BloomType |
getBloomFilterType()
Returns bloom filter type used for new StoreFiles in ColumnFamily
|
Compression.Algorithm |
getCompactionCompressionType()
Returns Compression type setting.
|
Compression.Algorithm |
getCompressionType()
Returns Compression type setting.
|
Map<String,String> |
getConfiguration()
Returns an unmodifiable map.
|
String |
getConfigurationValue(String key)
Returns accessing the configuration value by key.
|
DataBlockEncoding |
getDataBlockEncoding()
Returns the data block encoding algorithm used in block cache and optionally on disk
|
short |
getDFSReplication()
Returns replication factor set for this CF
|
byte[] |
getEncryptionKey()
Returns Return the raw crypto key attribute for the family, or null if not set
|
String |
getEncryptionType()
Returns Return the encryption algorithm in use by this family
|
MemoryCompactionPolicy |
getInMemoryCompaction()
Returns in-memory compaction policy if set for the cf.
|
KeepDeletedCells |
getKeepDeletedCells()
Returns return the KeepDeletedCells
|
Compression.Algorithm |
getMajorCompactionCompressionType()
Returns Compression type setting for major compactions.
|
int |
getMaxVersions()
Returns maximum number of versions
|
Compression.Algorithm |
getMinorCompactionCompressionType()
Returns Compression type setting for minor compactions.
|
int |
getMinVersions()
Returns The minimum number of versions to keep.
|
MobCompactPartitionPolicy |
getMobCompactPartitionPolicy()
Get the mob compact partition policy for this family n
|
long |
getMobThreshold()
Gets the mob threshold of the family.
|
byte[] |
getName()
Returns a copy of Name of this column family
|
String |
getNameAsString()
Returns Name of this column family
|
private <T> T |
getOrDefault(Bytes key,
Function<byte[],T> function,
T defaultValue) |
int |
getScope()
Returns the scope tag
|
String |
getStoragePolicy()
Not using
enum here because HDFS is not using enum 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 |
getTimeToLive()
Returns Time-to-live of cell contents, in seconds.
|
byte[] |
getValue(byte[] key)
Get a configuration value.
|
Bytes |
getValue(Bytes key)
Get a configuration value.
|
String |
getValue(String key)
Get a configuration value.
|
Map<Bytes,Bytes> |
getValues()
Get all configuration values.
|
private StringBuilder |
getValues(boolean printDefaults) |
int |
hashCode() |
boolean |
isBlockCacheEnabled()
Returns True if hfile DATA type blocks should be cached (You cannot disable caching of INDEX
and BLOOM type blocks).
|
boolean |
isCacheBloomsOnWrite()
Returns true if we should cache bloomfilter blocks on write
|
boolean |
isCacheDataOnWrite()
Returns true if we should cache data blocks on write
|
boolean |
isCacheIndexesOnWrite()
Returns true if we should cache index blocks on write
|
boolean |
isCompressTags()
Returns Whether KV tags should be compressed along with DataBlockEncoding.
|
boolean |
isEvictBlocksOnClose()
Returns true if we should evict cached blocks from the blockcache on close
|
boolean |
isInMemory()
Returns True if we are to favor keeping all values for this column family in the HRegionServer
cache.
|
boolean |
isMobEnabled()
Gets whether the mob is enabled for the family.
|
boolean |
isNewVersionBehavior()
By default, HBase only consider timestamp in versions.
|
boolean |
isPrefetchBlocksOnOpen()
Returns true if we should prefetch blocks into the blockcache on open
|
private static ColumnFamilyDescriptor |
parseFrom(byte[] bytes)
Parse the serialized representation of a
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
removeConfiguration(String key)
Remove a configuration setting represented by the key from the
configuration map. |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
removeValue(Bytes key) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setBlockCacheEnabled(boolean blockCacheEnabled)
Set the blockCacheEnabled flag
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setBlocksize(int s) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setBlocksize(String blocksize) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setBloomFilterType(BloomType bt) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setCacheBloomsOnWrite(boolean value)
Set the setCacheBloomsOnWrite flag.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setCacheDataOnWrite(boolean value)
Set the setCacheDataOnWrite flag
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setCacheIndexesOnWrite(boolean value)
Set the setCacheIndexesOnWrite flag
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setCompactionCompressionType(Compression.Algorithm type)
Compression types supported in hbase.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setCompressionType(Compression.Algorithm type)
Compression types supported in hbase.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setCompressTags(boolean compressTags)
Set whether the tags should be compressed along with DataBlockEncoding.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setConfiguration(String key,
String value)
Setter for storing a configuration setting in
configuration map. |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setDataBlockEncoding(DataBlockEncoding type)
Set data block encoding algorithm used in block cache.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setDFSReplication(short replication)
Set the replication factor to hfile(s) belonging to this family
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setEncryptionKey(byte[] keyBytes)
Set the raw crypto key attribute for the family
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setEncryptionType(String algorithm)
Set the encryption algorithm for use with this family
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setEvictBlocksOnClose(boolean value)
Set the setEvictBlocksOnClose flag.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setInMemory(boolean inMemory)
Set the inMemory flag
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setInMemoryCompaction(MemoryCompactionPolicy inMemoryCompaction) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setKeepDeletedCells(KeepDeletedCells keepDeletedCells) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setMajorCompactionCompressionType(Compression.Algorithm type) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setMaxVersions(int maxVersions)
Set the maximum number of versions to retain.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setMinorCompactionCompressionType(Compression.Algorithm type) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setMinVersions(int minVersions)
Set minimum versions to retain.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setMobCompactPartitionPolicy(MobCompactPartitionPolicy policy)
Set the mob compact partition policy for the family.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setMobEnabled(boolean isMobEnabled)
Enables the mob for the family.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setMobThreshold(long threshold)
Sets the mob threshold of the family.
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setNewVersionBehavior(boolean newVersionBehavior) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setPrefetchBlocksOnOpen(boolean value)
Set the setPrefetchBlocksOnOpen flag
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setScope(int scope) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setStoragePolicy(String policy)
Set the storage policy for use with this family
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setTimeToLive(int timeToLive)
Set the time to live
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setTimeToLive(String timeToLive)
Set the time to live
|
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setValue(byte[] key,
byte[] value) |
private ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setValue(Bytes key,
Bytes value) |
private ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setValue(Bytes key,
String value) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setValue(String key,
String value) |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
setVersions(int minVersions,
int maxVersions)
Set minimum and maximum versions to keep.
|
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.
|
private byte[] |
toByteArray()
Returns This instance serialized with pb with pb magic prefix
|
private static <T> Bytes |
toBytesOrNull(T t,
Function<T,byte[]> f) |
String |
toString() |
String |
toStringCustomizedValues()
Returns Column family descriptor with only the customized attributes.
|
private final byte[] name
private final Map<String,String> configuration
@InterfaceAudience.Private public ModifyableColumnFamilyDescriptor(byte[] name)
name
- Column family name. Must be 'printable' -- digit or letter -- and may not contain
a :
TODO: make this private after the HCD is removed.@InterfaceAudience.Private public ModifyableColumnFamilyDescriptor(ColumnFamilyDescriptor desc)
desc
- The descriptor.public byte[] getName()
ColumnFamilyDescriptor
getName
in interface ColumnFamilyDescriptor
public String getNameAsString()
ColumnFamilyDescriptor
getNameAsString
in interface ColumnFamilyDescriptor
public Bytes getValue(Bytes key)
ColumnFamilyDescriptor
getValue
in interface ColumnFamilyDescriptor
key
- The key.public byte[] getValue(byte[] key)
ColumnFamilyDescriptor
getValue
in interface ColumnFamilyDescriptor
key
- The key.public String getValue(String key)
ColumnFamilyDescriptor
getValue
in interface ColumnFamilyDescriptor
key
- The key.public Map<Bytes,Bytes> getValues()
ColumnFamilyDescriptor
getValues
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(byte[] key, byte[] value)
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(String key, String value)
private ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(Bytes key, String value)
private ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setValue(Bytes key, Bytes value)
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor removeValue(Bytes key)
private static <T> Bytes toBytesOrNull(T t, Function<T,byte[]> f)
private <T> T getStringOrDefault(Bytes key, Function<String,T> function, T defaultValue)
private <T> T getOrDefault(Bytes key, Function<byte[],T> function, T defaultValue)
public int getMaxVersions()
ColumnFamilyDescriptor
getMaxVersions
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMaxVersions(int maxVersions)
maxVersions
- maximum number of versionspublic ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setVersions(int minVersions, int maxVersions)
minVersions
- minimal number of versionsmaxVersions
- maximum number of versionspublic int getBlocksize()
ColumnFamilyDescriptor
getBlocksize
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setBlocksize(int s)
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setBlocksize(String blocksize) throws HBaseException
HBaseException
public Compression.Algorithm getCompressionType()
ColumnFamilyDescriptor
getCompressionType
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCompressionType(Compression.Algorithm type)
type
- Compression type setting.public DataBlockEncoding getDataBlockEncoding()
ColumnFamilyDescriptor
getDataBlockEncoding
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setDataBlockEncoding(DataBlockEncoding type)
type
- What kind of data block encoding will be used.public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCompressTags(boolean compressTags)
public boolean isCompressTags()
ColumnFamilyDescriptor
isCompressTags
in interface ColumnFamilyDescriptor
public Compression.Algorithm getCompactionCompressionType()
ColumnFamilyDescriptor
getCompactionCompressionType
in interface ColumnFamilyDescriptor
public Compression.Algorithm getMajorCompactionCompressionType()
ColumnFamilyDescriptor
getMajorCompactionCompressionType
in interface ColumnFamilyDescriptor
public Compression.Algorithm getMinorCompactionCompressionType()
ColumnFamilyDescriptor
getMinorCompactionCompressionType
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCompactionCompressionType(Compression.Algorithm type)
type
- Compression type setting.public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMajorCompactionCompressionType(Compression.Algorithm type)
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMinorCompactionCompressionType(Compression.Algorithm type)
public boolean isInMemory()
ColumnFamilyDescriptor
isInMemory
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setInMemory(boolean inMemory)
inMemory
- True if we are to favor keeping all values for this column family in the
HRegionServer cachepublic MemoryCompactionPolicy getInMemoryCompaction()
ColumnFamilyDescriptor
getInMemoryCompaction
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setInMemoryCompaction(MemoryCompactionPolicy inMemoryCompaction)
public KeepDeletedCells getKeepDeletedCells()
ColumnFamilyDescriptor
getKeepDeletedCells
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setKeepDeletedCells(KeepDeletedCells keepDeletedCells)
public boolean isNewVersionBehavior()
isNewVersionBehavior
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setNewVersionBehavior(boolean newVersionBehavior)
public int getTimeToLive()
ColumnFamilyDescriptor
getTimeToLive
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setTimeToLive(int timeToLive)
timeToLive
- Time-to-live of cell contents, in seconds.public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setTimeToLive(String timeToLive) throws HBaseException
timeToLive
- Time-to-live of cell contents, in seconds.HBaseException
- exceptionpublic int getMinVersions()
ColumnFamilyDescriptor
getMinVersions
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMinVersions(int minVersions)
minVersions
- The minimum number of versions to keep. (used when timeToLive is set)public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setVersionsWithTimeToLive(int retentionInterval, int versionAfterInterval)
retentionInterval
- Retain all versions for this intervalversionAfterInterval
- Retain no of versions to retain after retentionIntervalpublic boolean isBlockCacheEnabled()
ColumnFamilyDescriptor
isBlockCacheEnabled
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setBlockCacheEnabled(boolean blockCacheEnabled)
blockCacheEnabled
- True if hfile DATA type blocks should be cached (We always cache
INDEX and BLOOM blocks; you cannot turn this off).public BloomType getBloomFilterType()
ColumnFamilyDescriptor
getBloomFilterType
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setBloomFilterType(BloomType bt)
public int getScope()
ColumnFamilyDescriptor
getScope
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setScope(int scope)
public boolean isCacheDataOnWrite()
ColumnFamilyDescriptor
isCacheDataOnWrite
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCacheDataOnWrite(boolean value)
value
- true if we should cache data blocks on writepublic boolean isCacheIndexesOnWrite()
ColumnFamilyDescriptor
isCacheIndexesOnWrite
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCacheIndexesOnWrite(boolean value)
value
- true if we should cache index blocks on writepublic boolean isCacheBloomsOnWrite()
ColumnFamilyDescriptor
isCacheBloomsOnWrite
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setCacheBloomsOnWrite(boolean value)
value
- true if we should cache bloomfilter blocks on writepublic boolean isEvictBlocksOnClose()
ColumnFamilyDescriptor
isEvictBlocksOnClose
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setEvictBlocksOnClose(boolean value)
value
- true if we should evict cached blocks from the blockcache on closepublic boolean isPrefetchBlocksOnOpen()
ColumnFamilyDescriptor
isPrefetchBlocksOnOpen
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setPrefetchBlocksOnOpen(boolean value)
value
- true if we should prefetch blocks into the blockcache on openpublic String toStringCustomizedValues()
ColumnFamilyDescriptor
toStringCustomizedValues
in interface ColumnFamilyDescriptor
private StringBuilder getValues(boolean printDefaults)
public int compareTo(ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor other)
compareTo
in interface Comparable<ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor>
private byte[] toByteArray()
private static ColumnFamilyDescriptor parseFrom(byte[] bytes) throws DeserializationException
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
bytes
- A pb serialized ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
instance with pb magic
prefixColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
made from bytes
DeserializationException
toByteArray()
public String getConfigurationValue(String key)
ColumnFamilyDescriptor
getConfigurationValue
in interface ColumnFamilyDescriptor
public Map<String,String> getConfiguration()
ColumnFamilyDescriptor
getConfiguration
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setConfiguration(String key, String value)
configuration
map.key
- Config key. Same as XML config key e.g. hbase.something.or.other.value
- String value. If null, removes the configuration.public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor removeConfiguration(String key)
configuration
map.public String getEncryptionType()
ColumnFamilyDescriptor
getEncryptionType
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setEncryptionType(String algorithm)
public byte[] getEncryptionKey()
ColumnFamilyDescriptor
getEncryptionKey
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setEncryptionKey(byte[] keyBytes)
public long getMobThreshold()
ColumnFamilyDescriptor
getMobThreshold
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMobThreshold(long threshold)
threshold
- The mob threshold.public boolean isMobEnabled()
ColumnFamilyDescriptor
isMobEnabled
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMobEnabled(boolean isMobEnabled)
isMobEnabled
- Whether to enable the mob for the family.public MobCompactPartitionPolicy getMobCompactPartitionPolicy()
ColumnFamilyDescriptor
getMobCompactPartitionPolicy
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setMobCompactPartitionPolicy(MobCompactPartitionPolicy policy)
policy
- policy typepublic short getDFSReplication()
ColumnFamilyDescriptor
getDFSReplication
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setDFSReplication(short replication)
replication
- number of replicas the blocks(s) belonging to this CF should have, or
ColumnFamilyDescriptorBuilder.DEFAULT_DFS_REPLICATION
for the default replication factor set in
the filesystempublic String getStoragePolicy()
ColumnFamilyDescriptor
enum
here because HDFS is not using enum
for storage policy, see
org.apache.hadoop.hdfs.server.blockmanagement.BlockStoragePolicySuite for more details.getStoragePolicy
in interface ColumnFamilyDescriptor
public ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor setStoragePolicy(String policy)
policy
- the policy to set, valid setting includes: "LAZY_PERSIST",
"ALL_SSD", "ONE_SSD", "HOT", "WARM", "COLD"Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.