@InterfaceAudience.Public @InterfaceStability.Evolving public class HColumnDescriptor extends Object implements org.apache.hadoop.io.WritableComparable<HColumnDescriptor>
Modifier and Type | Field and Description |
---|---|
static String |
BLOCKCACHE
Key for the BLOCKCACHE attribute.
|
private Integer |
blocksize |
static String |
BLOCKSIZE
Size of storefile/hfile 'blocks'.
|
static String |
BLOOMFILTER |
static String |
CACHE_BLOOMS_ON_WRITE |
static String |
CACHE_DATA_IN_L1
Key for cache data into L1 if cache is set up with more than one tier.
|
static String |
CACHE_DATA_ON_WRITE |
static String |
CACHE_INDEX_ON_WRITE |
private int |
cachedMaxVersions |
private static byte |
COLUMN_DESCRIPTOR_VERSION |
static String |
COMPRESS_TAGS |
static String |
COMPRESSION |
static String |
COMPRESSION_COMPACT |
private Map<String,String> |
configuration
A map which holds the configuration specific to the column family.
|
static String |
DATA_BLOCK_ENCODING |
static boolean |
DEFAULT_BLOCKCACHE
Default setting for whether to use a block cache or not.
|
static int |
DEFAULT_BLOCKSIZE
Default size of blocks in files stored to the filesytem (hfiles).
|
static String |
DEFAULT_BLOOMFILTER
Default setting for whether or not to use bloomfilters.
|
static boolean |
DEFAULT_CACHE_BLOOMS_ON_WRITE
Default setting for whether to cache bloom filter blocks on write if block
caching is enabled.
|
static boolean |
DEFAULT_CACHE_DATA_IN_L1
Default setting for whether to cache data blocks in L1 tier.
|
static boolean |
DEFAULT_CACHE_DATA_ON_WRITE
Default setting for whether to cache data blocks on write if block caching
is enabled.
|
static boolean |
DEFAULT_CACHE_INDEX_ON_WRITE
Default setting for whether to cache index blocks on write if block
caching is enabled.
|
static boolean |
DEFAULT_COMPRESS_TAGS
Default compress tags along with any type of DataBlockEncoding.
|
static String |
DEFAULT_COMPRESSION
Default compression type.
|
static String |
DEFAULT_DATA_BLOCK_ENCODING
Default data block encoding algorithm.
|
static short |
DEFAULT_DFS_REPLICATION |
static boolean |
DEFAULT_ENCODE_ON_DISK
Default value of the flag that enables data block encoding on disk, as
opposed to encoding in cache only.
|
static boolean |
DEFAULT_EVICT_BLOCKS_ON_CLOSE
Default setting for whether to evict cached blocks from the blockcache on
close.
|
static boolean |
DEFAULT_IN_MEMORY
Default setting for whether to try and serve this column family from memory or not.
|
static KeepDeletedCells |
DEFAULT_KEEP_DELETED
Default setting for preventing deleted from being collected immediately.
|
static int |
DEFAULT_MIN_VERSIONS
Default is not to keep a minimum of versions.
|
static boolean |
DEFAULT_PREFETCH_BLOCKS_ON_OPEN |
static int |
DEFAULT_REPLICATION_SCOPE
Default scope.
|
static int |
DEFAULT_TTL
Default time to live of cell contents.
|
private static Map<String,String> |
DEFAULT_VALUES |
static int |
DEFAULT_VERSIONS
Default number of versions of a record to keep.
|
static String |
DFS_REPLICATION |
static String |
ENCODE_ON_DISK |
static String |
ENCRYPTION |
static String |
ENCRYPTION_KEY |
static String |
EVICT_BLOCKS_ON_CLOSE |
static String |
FOREVER |
static String |
KEEP_DELETED_CELLS |
static String |
LENGTH |
static String |
MIN_VERSIONS |
private byte[] |
name |
static String |
PREFETCH_BLOCKS_ON_OPEN
Key for the PREFETCH_BLOCKS_ON_OPEN attribute.
|
static String |
REPLICATION_SCOPE |
static byte[] |
REPLICATION_SCOPE_BYTES |
private static Set<ImmutableBytesWritable> |
RESERVED_KEYWORDS |
static String |
TTL |
private static int |
UNINITIALIZED |
private Map<ImmutableBytesWritable,ImmutableBytesWritable> |
values |
Constructor and Description |
---|
HColumnDescriptor()
Deprecated.
As of release 0.96
(HBASE-5453).
This will be made private in HBase 2.0.0.
Used by Writables and Writables are going away.
|
HColumnDescriptor(byte[] familyName)
Construct a column descriptor specifying only the family name
The other attributes are defaulted.
|
HColumnDescriptor(byte[] familyName,
int minVersions,
int maxVersions,
KeepDeletedCells keepDeletedCells,
String compression,
boolean encodeOnDisk,
String dataBlockEncoding,
boolean inMemory,
boolean blockCacheEnabled,
int blocksize,
int timeToLive,
String bloomFilter,
int scope)
Deprecated.
As of release 0.96
(HBASE-).
This will be removed in HBase 2.0.0.
Use
HColumnDescriptor(String) and setters. |
HColumnDescriptor(byte[] familyName,
int maxVersions,
String compression,
boolean inMemory,
boolean blockCacheEnabled,
int blocksize,
int timeToLive,
String bloomFilter,
int scope)
Deprecated.
As of release 0.96
(HBASE-).
This will be removed in HBase 2.0.0.
Use
HColumnDescriptor(String) and setters. |
HColumnDescriptor(byte[] familyName,
int maxVersions,
String compression,
boolean inMemory,
boolean blockCacheEnabled,
int timeToLive,
String bloomFilter)
Deprecated.
As of release 0.96
(HBASE-).
This will be removed in HBase 2.0.0.
Use
HColumnDescriptor(String) and setters. |
HColumnDescriptor(HColumnDescriptor desc)
Constructor.
|
HColumnDescriptor(String familyName)
Construct a column descriptor specifying only the family name
The other attributes are defaulted.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(HColumnDescriptor o) |
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ColumnFamilySchema |
convert() |
static HColumnDescriptor |
convert(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ColumnFamilySchema cfs) |
boolean |
equals(Object obj) |
int |
getBlocksize() |
BloomType |
getBloomFilterType() |
Compression.Algorithm |
getCompactionCompression() |
Compression.Algorithm |
getCompactionCompressionType() |
Compression.Algorithm |
getCompression() |
Compression.Algorithm |
getCompressionType() |
Map<String,String> |
getConfiguration()
Getter for fetching an unmodifiable
configuration map. |
String |
getConfigurationValue(String key)
Getter for accessing the configuration value by key.
|
DataBlockEncoding |
getDataBlockEncoding() |
DataBlockEncoding |
getDataBlockEncodingOnDisk()
Deprecated.
As of release 0.98
(HBASE-9870).
This will be removed in HBase 2.0.0. See
getDataBlockEncoding() } |
static Map<String,String> |
getDefaultValues() |
short |
getDFSReplication() |
byte[] |
getEncryptionKey()
Return the raw crypto key attribute for the family, or null if not set
|
String |
getEncryptionType()
Return the encryption algorithm in use by this family
|
KeepDeletedCells |
getKeepDeletedCells() |
int |
getMaxVersions() |
int |
getMinVersions() |
byte[] |
getName() |
String |
getNameAsString() |
int |
getScope() |
int |
getTimeToLive() |
static PrettyPrinter.Unit |
getUnit(String key) |
byte[] |
getValue(byte[] key) |
String |
getValue(String key) |
Map<ImmutableBytesWritable,ImmutableBytesWritable> |
getValues() |
private StringBuilder |
getValues(boolean printDefaults) |
int |
hashCode() |
boolean |
isBlockCacheEnabled() |
boolean |
isCacheBloomsOnWrite() |
boolean |
isCacheDataInL1() |
boolean |
isCacheDataOnWrite() |
boolean |
isCacheIndexesOnWrite() |
boolean |
isCompressTags() |
boolean |
isEvictBlocksOnClose() |
boolean |
isInMemory() |
static byte[] |
isLegalFamilyName(byte[] b) |
boolean |
isPrefetchBlocksOnOpen() |
static HColumnDescriptor |
parseFrom(byte[] bytes) |
void |
readFields(DataInput in)
Deprecated.
Writables are going away. Use pb
parseFrom(byte[]) instead. |
void |
remove(byte[] key) |
void |
removeConfiguration(String key)
Remove a configuration setting represented by the key from the
configuration map. |
private boolean |
setAndGetBoolean(String key,
boolean defaultSetting) |
HColumnDescriptor |
setBlockCacheEnabled(boolean blockCacheEnabled) |
HColumnDescriptor |
setBlocksize(int s) |
HColumnDescriptor |
setBloomFilterType(BloomType bt) |
HColumnDescriptor |
setCacheBloomsOnWrite(boolean value) |
HColumnDescriptor |
setCacheDataInL1(boolean value) |
HColumnDescriptor |
setCacheDataOnWrite(boolean value) |
HColumnDescriptor |
setCacheIndexesOnWrite(boolean value) |
HColumnDescriptor |
setCompactionCompressionType(Compression.Algorithm type)
Compression types supported in hbase.
|
HColumnDescriptor |
setCompressionType(Compression.Algorithm type)
Compression types supported in hbase.
|
HColumnDescriptor |
setCompressTags(boolean compressTags)
Set whether the tags should be compressed along with DataBlockEncoding.
|
HColumnDescriptor |
setConfiguration(String key,
String value)
Setter for storing a configuration setting in
configuration map. |
HColumnDescriptor |
setDataBlockEncoding(DataBlockEncoding type)
Set data block encoding algorithm used in block cache.
|
HColumnDescriptor |
setDFSReplication(short replication)
Set the replication factor to hfile(s) belonging to this family
|
HColumnDescriptor |
setEncodeOnDisk(boolean encodeOnDisk)
Deprecated.
As of release 0.98
(HBASE-9870).
This will be removed in HBase 2.0.0. This method does nothing now.
|
HColumnDescriptor |
setEncryptionKey(byte[] keyBytes)
Set the raw crypto key attribute for the family
|
HColumnDescriptor |
setEncryptionType(String algorithm)
Set the encryption algorithm for use with this family
|
HColumnDescriptor |
setEvictBlocksOnClose(boolean value) |
HColumnDescriptor |
setInMemory(boolean inMemory) |
HColumnDescriptor |
setKeepDeletedCells(boolean keepDeletedCells)
Deprecated.
As of release 1.0.0
(HBASE-12363).
This will be removed in HBase 2.0.0.
Use
setKeepDeletedCells(KeepDeletedCells) . |
HColumnDescriptor |
setKeepDeletedCells(KeepDeletedCells keepDeletedCells) |
HColumnDescriptor |
setMaxVersions(int maxVersions) |
HColumnDescriptor |
setMinVersions(int minVersions) |
HColumnDescriptor |
setPrefetchBlocksOnOpen(boolean value) |
HColumnDescriptor |
setScope(int scope) |
HColumnDescriptor |
setTimeToLive(int timeToLive) |
HColumnDescriptor |
setValue(byte[] key,
byte[] value) |
HColumnDescriptor |
setValue(String key,
String value) |
HColumnDescriptor |
setVersions(int minVersions,
int maxVersions)
Set minimum and maximum versions to keep
|
boolean |
shouldCacheBloomsOnWrite()
Deprecated.
As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use
isCacheBloomsOnWrite() } instead. |
boolean |
shouldCacheDataInL1()
Deprecated.
As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0. Use
isCacheDataInL1() } instead. |
boolean |
shouldCacheDataOnWrite()
Deprecated.
As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0. Use
isCacheDataOnWrite() } instead. |
boolean |
shouldCacheIndexesOnWrite()
Deprecated.
As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use
isCacheIndexesOnWrite() instead. |
boolean |
shouldCompressTags()
Deprecated.
As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0. Use
isCompressTags() instead. |
boolean |
shouldEvictBlocksOnClose()
Deprecated.
As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use
isEvictBlocksOnClose() } instead. |
boolean |
shouldPrefetchBlocksOnOpen()
Deprecated.
As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use
isPrefetchBlocksOnOpen() }} instead. |
byte[] |
toByteArray() |
String |
toString() |
String |
toStringCustomizedValues() |
void |
write(DataOutput out)
Deprecated.
Writables are going away. Use
toByteArray() instead. |
private static final byte COLUMN_DESCRIPTOR_VERSION
public static final String COMPRESSION
public static final String COMPRESSION_COMPACT
public static final String ENCODE_ON_DISK
public static final String DATA_BLOCK_ENCODING
public static final String BLOCKCACHE
public static final String CACHE_DATA_ON_WRITE
public static final String CACHE_INDEX_ON_WRITE
public static final String CACHE_BLOOMS_ON_WRITE
public static final String EVICT_BLOCKS_ON_CLOSE
public static final String CACHE_DATA_IN_L1
hbase(main):003:0> create 't',
{NAME => 't', CONFIGURATION => {CACHE_DATA_IN_L1 => 'true'}}
public static final String PREFETCH_BLOCKS_ON_OPEN
public static final String BLOCKSIZE
DEFAULT_BLOCKSIZE
.
Use smaller block sizes for faster random-access at expense of larger
indices (more memory consumption).public static final String LENGTH
public static final String TTL
public static final String BLOOMFILTER
public static final String FOREVER
public static final String REPLICATION_SCOPE
public static final byte[] REPLICATION_SCOPE_BYTES
public static final String MIN_VERSIONS
public static final String KEEP_DELETED_CELLS
public static final String COMPRESS_TAGS
public static final String ENCRYPTION
public static final String ENCRYPTION_KEY
public static final String DFS_REPLICATION
public static final short DEFAULT_DFS_REPLICATION
public static final String DEFAULT_COMPRESSION
public static final boolean DEFAULT_ENCODE_ON_DISK
DATA_BLOCK_ENCODING
is not NONE.public static final String DEFAULT_DATA_BLOCK_ENCODING
public static final int DEFAULT_VERSIONS
public static final int DEFAULT_MIN_VERSIONS
private volatile Integer blocksize
public static final boolean DEFAULT_IN_MEMORY
public static final KeepDeletedCells DEFAULT_KEEP_DELETED
public static final boolean DEFAULT_BLOCKCACHE
public static final boolean DEFAULT_CACHE_DATA_ON_WRITE
public static final boolean DEFAULT_CACHE_DATA_IN_L1
public static final boolean DEFAULT_CACHE_INDEX_ON_WRITE
public static final int DEFAULT_BLOCKSIZE
public static final String DEFAULT_BLOOMFILTER
public static final boolean DEFAULT_CACHE_BLOOMS_ON_WRITE
public static final int DEFAULT_TTL
public static final int DEFAULT_REPLICATION_SCOPE
public static final boolean DEFAULT_EVICT_BLOCKS_ON_CLOSE
public static final boolean DEFAULT_COMPRESS_TAGS
public static final boolean DEFAULT_PREFETCH_BLOCKS_ON_OPEN
private static final Set<ImmutableBytesWritable> RESERVED_KEYWORDS
private static final int UNINITIALIZED
private byte[] name
private final Map<ImmutableBytesWritable,ImmutableBytesWritable> values
private final Map<String,String> configuration
private int cachedMaxVersions
@Deprecated public HColumnDescriptor()
public HColumnDescriptor(String familyName)
familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
public HColumnDescriptor(byte[] familyName)
familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
public HColumnDescriptor(HColumnDescriptor desc)
desc
- The descriptor.@Deprecated public HColumnDescriptor(byte[] familyName, int maxVersions, String compression, boolean inMemory, boolean blockCacheEnabled, int timeToLive, String bloomFilter)
HColumnDescriptor(String)
and setters.familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
maxVersions
- Maximum number of versions to keepcompression
- Compression typeinMemory
- If true, column data should be kept in an HRegionServer's
cacheblockCacheEnabled
- If true, MapFile blocks should be cachedtimeToLive
- Time-to-live of cell contents, in seconds
(use HConstants.FOREVER for unlimited TTL)bloomFilter
- Bloom filter type for this columnIllegalArgumentException
- if passed a family name that is made of
other than 'word' characters: i.e. [a-zA-Z_0-9]
or contains
a :
IllegalArgumentException
- if the number of versions is <= 0@Deprecated public HColumnDescriptor(byte[] familyName, int maxVersions, String compression, boolean inMemory, boolean blockCacheEnabled, int blocksize, int timeToLive, String bloomFilter, int scope)
HColumnDescriptor(String)
and setters.familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
maxVersions
- Maximum number of versions to keepcompression
- Compression typeinMemory
- If true, column data should be kept in an HRegionServer's
cacheblockCacheEnabled
- If true, MapFile blocks should be cachedblocksize
- Block size to use when writing out storefiles. Use
smaller block sizes for faster random-access at expense of larger indices
(more memory consumption). Default is usually 64k.timeToLive
- Time-to-live of cell contents, in seconds
(use HConstants.FOREVER for unlimited TTL)bloomFilter
- Bloom filter type for this columnscope
- The scope tag for this columnIllegalArgumentException
- if passed a family name that is made of
other than 'word' characters: i.e. [a-zA-Z_0-9]
or contains
a :
IllegalArgumentException
- if the number of versions is <= 0@Deprecated public HColumnDescriptor(byte[] familyName, int minVersions, int maxVersions, KeepDeletedCells keepDeletedCells, String compression, boolean encodeOnDisk, String dataBlockEncoding, boolean inMemory, boolean blockCacheEnabled, int blocksize, int timeToLive, String bloomFilter, int scope)
HColumnDescriptor(String)
and setters.familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
minVersions
- Minimum number of versions to keepmaxVersions
- Maximum number of versions to keepkeepDeletedCells
- Whether to retain deleted cells until they expire
up to maxVersions versions.compression
- Compression typeencodeOnDisk
- whether to use the specified data block encoding
on disk. If false, the encoding will be used in cache only.dataBlockEncoding
- data block encodinginMemory
- If true, column data should be kept in an HRegionServer's
cacheblockCacheEnabled
- If true, MapFile blocks should be cachedblocksize
- Block size to use when writing out storefiles. Use
smaller blocksizes for faster random-access at expense of larger indices
(more memory consumption). Default is usually 64k.timeToLive
- Time-to-live of cell contents, in seconds
(use HConstants.FOREVER for unlimited TTL)bloomFilter
- Bloom filter type for this columnscope
- The scope tag for this columnIllegalArgumentException
- if passed a family name that is made of
other than 'word' characters: i.e. [a-zA-Z_0-9]
or contains
a :
IllegalArgumentException
- if the number of versions is <= 0public static byte[] isLegalFamilyName(byte[] b)
b
- Family name.b
IllegalArgumentException
- If not null and not a legitimate family
name: i.e. 'printable' and ends in a ':' (Null passes are allowed because
b
can be null when deserializing). Cannot start with a '.'
either. Also Family can not be an empty value or equal "recovered.edits".public byte[] getName()
public String getNameAsString()
public byte[] getValue(byte[] key)
key
- The key.public String getValue(String key)
key
- The key.public Map<ImmutableBytesWritable,ImmutableBytesWritable> getValues()
public HColumnDescriptor setValue(byte[] key, byte[] value)
key
- The key.value
- The value.public void remove(byte[] key)
key
- Key whose key and value we're to remove from HCD parameters.public HColumnDescriptor setValue(String key, String value)
key
- The key.value
- The value.public Compression.Algorithm getCompression()
public Compression.Algorithm getCompactionCompression()
public int getMaxVersions()
public HColumnDescriptor setMaxVersions(int maxVersions)
maxVersions
- maximum number of versionspublic HColumnDescriptor setVersions(int minVersions, int maxVersions)
minVersions
- minimal number of versionsmaxVersions
- maximum number of versionspublic int getBlocksize()
public HColumnDescriptor setBlocksize(int s)
s
- Blocksize to use when writing out storefiles/hfiles on this
column family.public Compression.Algorithm getCompressionType()
public HColumnDescriptor setCompressionType(Compression.Algorithm type)
type
- Compression type setting.@Deprecated public DataBlockEncoding getDataBlockEncodingOnDisk()
getDataBlockEncoding()
}@Deprecated public HColumnDescriptor setEncodeOnDisk(boolean encodeOnDisk)
public DataBlockEncoding getDataBlockEncoding()
public HColumnDescriptor setDataBlockEncoding(DataBlockEncoding type)
type
- What kind of data block encoding will be used.public HColumnDescriptor setCompressTags(boolean compressTags)
compressTags
- @Deprecated public boolean shouldCompressTags()
isCompressTags()
instead.public boolean isCompressTags()
public Compression.Algorithm getCompactionCompressionType()
public HColumnDescriptor setCompactionCompressionType(Compression.Algorithm type)
type
- Compression type setting.public boolean isInMemory()
public HColumnDescriptor setInMemory(boolean inMemory)
inMemory
- True if we are to favor keeping all values for this column family in the
HRegionServer cachepublic KeepDeletedCells getKeepDeletedCells()
@Deprecated public HColumnDescriptor setKeepDeletedCells(boolean keepDeletedCells)
setKeepDeletedCells(KeepDeletedCells)
.keepDeletedCells
- True if deleted rows should not be collected
immediately.public HColumnDescriptor setKeepDeletedCells(KeepDeletedCells keepDeletedCells)
keepDeletedCells
- True if deleted rows should not be collected
immediately.public int getTimeToLive()
public HColumnDescriptor setTimeToLive(int timeToLive)
timeToLive
- Time-to-live of cell contents, in seconds.public int getMinVersions()
public HColumnDescriptor setMinVersions(int minVersions)
minVersions
- The minimum number of versions to keep.
(used when timeToLive is set)public boolean isBlockCacheEnabled()
public HColumnDescriptor 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()
public HColumnDescriptor setBloomFilterType(BloomType bt)
bt
- bloom filter typepublic int getScope()
public HColumnDescriptor setScope(int scope)
scope
- the scope tag@Deprecated public boolean shouldCacheDataOnWrite()
isCacheDataOnWrite()
} instead.public boolean isCacheDataOnWrite()
public HColumnDescriptor setCacheDataOnWrite(boolean value)
value
- true if we should cache data blocks on write@Deprecated public boolean shouldCacheDataInL1()
isCacheDataInL1()
} instead.public boolean isCacheDataInL1()
public HColumnDescriptor setCacheDataInL1(boolean value)
value
- true if we should cache data blocks in the L1 cache (if block cache deploy
has more than one tier; e.g. we are using CombinedBlockCache).private boolean setAndGetBoolean(String key, boolean defaultSetting)
@Deprecated public boolean shouldCacheIndexesOnWrite()
isCacheIndexesOnWrite()
instead.public boolean isCacheIndexesOnWrite()
public HColumnDescriptor setCacheIndexesOnWrite(boolean value)
value
- true if we should cache index blocks on write@Deprecated public boolean shouldCacheBloomsOnWrite()
isCacheBloomsOnWrite()
} instead.public boolean isCacheBloomsOnWrite()
public HColumnDescriptor setCacheBloomsOnWrite(boolean value)
value
- true if we should cache bloomfilter blocks on write@Deprecated public boolean shouldEvictBlocksOnClose()
isEvictBlocksOnClose()
} instead.public boolean isEvictBlocksOnClose()
public HColumnDescriptor setEvictBlocksOnClose(boolean value)
value
- true if we should evict cached blocks from the blockcache on
close@Deprecated public boolean shouldPrefetchBlocksOnOpen()
isPrefetchBlocksOnOpen()
}} instead.public boolean isPrefetchBlocksOnOpen()
public HColumnDescriptor setPrefetchBlocksOnOpen(boolean value)
value
- true if we should prefetch blocks into the blockcache on openpublic String toString()
toString
in class Object
Object.toString()
public String toStringCustomizedValues()
private StringBuilder getValues(boolean printDefaults)
public static PrettyPrinter.Unit getUnit(String key)
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
@Deprecated public void readFields(DataInput in) throws IOException
parseFrom(byte[])
instead.readFields
in interface org.apache.hadoop.io.Writable
IOException
@Deprecated public void write(DataOutput out) throws IOException
toByteArray()
instead.write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(HColumnDescriptor o)
compareTo
in interface Comparable<HColumnDescriptor>
public byte[] toByteArray()
parseFrom(byte[])
public static HColumnDescriptor parseFrom(byte[] bytes) throws DeserializationException
bytes
- A pb serialized HColumnDescriptor
instance with pb magic prefixHColumnDescriptor
made from bytes
DeserializationException
toByteArray()
public static HColumnDescriptor convert(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ColumnFamilySchema cfs)
cfs
- HColumnDescriptor
made from the passed in cfs
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ColumnFamilySchema convert()
public String getConfigurationValue(String key)
public Map<String,String> getConfiguration()
configuration
map.public HColumnDescriptor 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 void removeConfiguration(String key)
configuration
map.public String getEncryptionType()
public HColumnDescriptor setEncryptionType(String algorithm)
algorithm
- public byte[] getEncryptionKey()
public HColumnDescriptor setEncryptionKey(byte[] keyBytes)
public short getDFSReplication()
DEFAULT_DFS_REPLICATION
if not set.
DEFAULT_DFS_REPLICATION
value indicates that user has explicitly not set any
block replication factor for this CF, hence use the default replication factor set in
the file system.
public HColumnDescriptor setDFSReplication(short replication)
replication
- number of replicas the blocks(s) belonging to this CF should have, or
DEFAULT_DFS_REPLICATION
for the default replication factor set in the
filesystemCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.