@InterfaceAudience.Public @InterfaceStability.Evolving public class HColumnDescriptor extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BLOCKCACHE
Key for the BLOCKCACHE attribute.
|
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 |
static String |
COMPRESS_TAGS |
static String |
COMPRESSION |
static String |
COMPRESSION_COMPACT |
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 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.
|
static int |
DEFAULT_VERSIONS
Default number of versions of a record to keep.
|
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 |
static String |
PREFETCH_BLOCKS_ON_OPEN
Key for the PREFETCH_BLOCKS_ON_OPEN attribute.
|
static String |
REPLICATION_SCOPE |
static byte[] |
REPLICATION_SCOPE_BYTES |
static String |
TTL |
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.
|
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 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
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
@Deprecated public HColumnDescriptor()
public HColumnDescriptor(String familyName)
familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
-
HColumnDescriptor
public HColumnDescriptor(byte[] familyName)
Construct a column descriptor specifying only the family name
The other attributes are defaulted.
- Parameters:
familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
-
HColumnDescriptor
public HColumnDescriptor(HColumnDescriptor desc)
Constructor.
Makes a deep copy of the supplied descriptor.
Can make a modifiable descriptor from an UnmodifyableHColumnDescriptor.
- Parameters:
desc
- The descriptor.
-
HColumnDescriptor
@Deprecated
public 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.
Constructor
- Parameters:
familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
maxVersions
- Maximum number of versions to keep
compression
- Compression type
inMemory
- If true, column data should be kept in an HRegionServer's
cache
blockCacheEnabled
- If true, MapFile blocks should be cached
timeToLive
- Time-to-live of cell contents, in seconds
(use HConstants.FOREVER for unlimited TTL)
bloomFilter
- Bloom filter type for this column
- Throws:
IllegalArgumentException
- 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
-
HColumnDescriptor
@Deprecated
public 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.
Constructor
- Parameters:
familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
maxVersions
- Maximum number of versions to keep
compression
- Compression type
inMemory
- If true, column data should be kept in an HRegionServer's
cache
blockCacheEnabled
- If true, MapFile blocks should be cached
blocksize
- 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 column
scope
- The scope tag for this column
- Throws:
IllegalArgumentException
- 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
-
HColumnDescriptor
@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)
Deprecated. As of release 0.96
(HBASE-).
This will be removed in HBase 2.0.0.
Use HColumnDescriptor(String)
and setters.
Constructor
- Parameters:
familyName
- Column family name. Must be 'printable' -- digit or
letter -- and may not contain a :
minVersions
- Minimum number of versions to keep
maxVersions
- Maximum number of versions to keep
keepDeletedCells
- Whether to retain deleted cells until they expire
up to maxVersions versions.
compression
- Compression type
encodeOnDisk
- whether to use the specified data block encoding
on disk. If false, the encoding will be used in cache only.
dataBlockEncoding
- data block encoding
inMemory
- If true, column data should be kept in an HRegionServer's
cache
blockCacheEnabled
- If true, MapFile blocks should be cached
blocksize
- 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 column
scope
- The scope tag for this column
- Throws:
IllegalArgumentException
- 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
-
Method Detail
-
isLegalFamilyName
public static byte[] isLegalFamilyName(byte[] b)
- 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 because
b
can be null when deserializing). Cannot start with a '.'
either. Also Family can not be an empty value or equal "recovered.edits".
-
getName
public byte[] getName()
- Returns:
- Name of this column family
-
getNameAsString
public String getNameAsString()
- Returns:
- Name of this column family
-
getValue
public byte[] getValue(byte[] key)
- Parameters:
key
- The key.
- Returns:
- The value.
-
getValue
public String getValue(String key)
- Parameters:
key
- The key.
- Returns:
- The value as a string.
-
getValues
public Map<ImmutableBytesWritable,ImmutableBytesWritable> getValues()
- Returns:
- All values.
-
setValue
public HColumnDescriptor setValue(byte[] key,
byte[] value)
- Parameters:
key
- The key.
value
- The value.
- Returns:
- this (for chained invocation)
-
remove
public void remove(byte[] key)
- Parameters:
key
- Key whose key and value we're to remove from HCD parameters.
-
setValue
public HColumnDescriptor setValue(String key,
String value)
- Parameters:
key
- The key.
value
- The value.
- Returns:
- this (for chained invocation)
-
getCompression
public Compression.Algorithm getCompression()
- Returns:
- compression type being used for the column family
-
getCompactionCompression
public Compression.Algorithm getCompactionCompression()
- Returns:
- compression type being used for the column family for major
compression
-
getMaxVersions
public int getMaxVersions()
- Returns:
- maximum number of versions
-
setMaxVersions
public HColumnDescriptor setMaxVersions(int maxVersions)
- Parameters:
maxVersions
- maximum number of versions
- Returns:
- this (for chained invocation)
-
getBlocksize
public int getBlocksize()
- Returns:
- The storefile/hfile blocksize for this column family.
-
setBlocksize
public HColumnDescriptor setBlocksize(int s)
- Parameters:
s
- Blocksize to use when writing out storefiles/hfiles on this
column family.
- Returns:
- this (for chained invocation)
-
getCompressionType
public Compression.Algorithm getCompressionType()
- Returns:
- Compression type setting.
-
setCompressionType
public HColumnDescriptor 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)
-
getDataBlockEncodingOnDisk
@Deprecated
public DataBlockEncoding getDataBlockEncodingOnDisk()
Deprecated. As of release 0.98
(HBASE-9870).
This will be removed in HBase 2.0.0. See getDataBlockEncoding()
}
- Returns:
- data block encoding algorithm used on disk
-
setEncodeOnDisk
@Deprecated
public 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.
This method does nothing now. Flag ENCODE_ON_DISK is not used
any more. Data blocks have the same encoding in cache as on disk.
- Returns:
- this (for chained invocation)
-
getDataBlockEncoding
public DataBlockEncoding getDataBlockEncoding()
- Returns:
- the data block encoding algorithm used in block cache and
optionally on disk
-
setDataBlockEncoding
public HColumnDescriptor 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)
-
setCompressTags
public HColumnDescriptor setCompressTags(boolean compressTags)
Set whether the tags should be compressed along with DataBlockEncoding. When no
DataBlockEncoding is been used, this is having no effect.
- Parameters:
compressTags
-
- Returns:
- this (for chained invocation)
-
shouldCompressTags
@Deprecated
public boolean shouldCompressTags()
Deprecated. As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0. Use isCompressTags()
instead.
- Returns:
- Whether KV tags should be compressed along with DataBlockEncoding. When no
DataBlockEncoding is been used, this is having no effect.
-
isCompressTags
public boolean isCompressTags()
- Returns:
- Whether KV tags should be compressed along with DataBlockEncoding. When no
DataBlockEncoding is been used, this is having no effect.
-
getCompactionCompressionType
public Compression.Algorithm getCompactionCompressionType()
- Returns:
- Compression type setting.
-
setCompactionCompressionType
public HColumnDescriptor 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)
-
isInMemory
public boolean isInMemory()
- Returns:
- True if we are to favor keeping all values for this column family in the
HRegionServer cache.
-
setInMemory
public HColumnDescriptor setInMemory(boolean inMemory)
- Parameters:
inMemory
- True if we are to favor keeping all values for this column family in the
HRegionServer cache
- Returns:
- this (for chained invocation)
-
getKeepDeletedCells
public KeepDeletedCells getKeepDeletedCells()
-
setKeepDeletedCells
@Deprecated
public 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)
.
- Parameters:
keepDeletedCells
- True if deleted rows should not be collected
immediately.
- Returns:
- this (for chained invocation)
-
setKeepDeletedCells
public HColumnDescriptor setKeepDeletedCells(KeepDeletedCells keepDeletedCells)
- Parameters:
keepDeletedCells
- True if deleted rows should not be collected
immediately.
- Returns:
- this (for chained invocation)
-
getTimeToLive
public int getTimeToLive()
- Returns:
- Time-to-live of cell contents, in seconds.
-
setTimeToLive
public HColumnDescriptor setTimeToLive(int timeToLive)
- Parameters:
timeToLive
- Time-to-live of cell contents, in seconds.
- Returns:
- this (for chained invocation)
-
getMinVersions
public int getMinVersions()
- Returns:
- The minimum number of versions to keep.
-
setMinVersions
public HColumnDescriptor setMinVersions(int minVersions)
- Parameters:
minVersions
- The minimum number of versions to keep.
(used when timeToLive is set)
- Returns:
- this (for chained invocation)
-
isBlockCacheEnabled
public boolean isBlockCacheEnabled()
- Returns:
- True if hfile DATA type blocks should be cached (You cannot disable caching of INDEX
and BLOOM type blocks).
-
setBlockCacheEnabled
public HColumnDescriptor setBlockCacheEnabled(boolean blockCacheEnabled)
- 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
public BloomType getBloomFilterType()
- Returns:
- bloom filter type used for new StoreFiles in ColumnFamily
-
setBloomFilterType
public HColumnDescriptor setBloomFilterType(BloomType bt)
- Parameters:
bt
- bloom filter type
- Returns:
- this (for chained invocation)
-
getScope
public int getScope()
- Returns:
- the scope tag
-
setScope
public HColumnDescriptor setScope(int scope)
- Parameters:
scope
- the scope tag
- Returns:
- this (for chained invocation)
-
shouldCacheDataOnWrite
@Deprecated
public boolean shouldCacheDataOnWrite()
Deprecated. As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0. Use isCacheDataOnWrite()
} instead.
- Returns:
- true if we should cache data blocks on write
-
isCacheDataOnWrite
public boolean isCacheDataOnWrite()
- Returns:
- true if we should cache data blocks on write
-
setCacheDataOnWrite
public HColumnDescriptor setCacheDataOnWrite(boolean value)
- Parameters:
value
- true if we should cache data blocks on write
- Returns:
- this (for chained invocation)
-
shouldCacheDataInL1
@Deprecated
public boolean shouldCacheDataInL1()
Deprecated. As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0. Use isCacheDataInL1()
} instead.
- Returns:
- 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).
-
isCacheDataInL1
public boolean isCacheDataInL1()
- Returns:
- 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).
-
setCacheDataInL1
public HColumnDescriptor setCacheDataInL1(boolean value)
- Parameters:
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).
- Returns:
- this (for chained invocation)
-
shouldCacheIndexesOnWrite
@Deprecated
public boolean shouldCacheIndexesOnWrite()
Deprecated. As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use isCacheIndexesOnWrite()
instead.
- Returns:
- true if we should cache index blocks on write
-
isCacheIndexesOnWrite
public boolean isCacheIndexesOnWrite()
- Returns:
- true if we should cache index blocks on write
-
setCacheIndexesOnWrite
public HColumnDescriptor setCacheIndexesOnWrite(boolean value)
- Parameters:
value
- true if we should cache index blocks on write
- Returns:
- this (for chained invocation)
-
shouldCacheBloomsOnWrite
@Deprecated
public boolean shouldCacheBloomsOnWrite()
Deprecated. As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use isCacheBloomsOnWrite()
} instead.
- Returns:
- true if we should cache bloomfilter blocks on write
-
isCacheBloomsOnWrite
public boolean isCacheBloomsOnWrite()
- Returns:
- true if we should cache bloomfilter blocks on write
-
setCacheBloomsOnWrite
public HColumnDescriptor setCacheBloomsOnWrite(boolean value)
- Parameters:
value
- true if we should cache bloomfilter blocks on write
- Returns:
- this (for chained invocation)
-
shouldEvictBlocksOnClose
@Deprecated
public boolean shouldEvictBlocksOnClose()
Deprecated. As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use isEvictBlocksOnClose()
} instead.
- Returns:
- true if we should evict cached blocks from the blockcache on
close
-
isEvictBlocksOnClose
public boolean isEvictBlocksOnClose()
- Returns:
- true if we should evict cached blocks from the blockcache on close
-
setEvictBlocksOnClose
public HColumnDescriptor setEvictBlocksOnClose(boolean value)
- Parameters:
value
- true if we should evict cached blocks from the blockcache on
close
- Returns:
- this (for chained invocation)
-
shouldPrefetchBlocksOnOpen
@Deprecated
public boolean shouldPrefetchBlocksOnOpen()
Deprecated. As of release 1.0.0
(HBASE-10870).
This will be removed in HBase 2.0.0.
Use isPrefetchBlocksOnOpen()
}} instead.
- Returns:
- true if we should prefetch blocks into the blockcache on open
-
isPrefetchBlocksOnOpen
public boolean isPrefetchBlocksOnOpen()
- Returns:
- true if we should prefetch blocks into the blockcache on open
-
setPrefetchBlocksOnOpen
public HColumnDescriptor setPrefetchBlocksOnOpen(boolean value)
- Parameters:
value
- true if we should prefetch blocks into the blockcache on open
- Returns:
- this (for chained invocation)
-
toString
public String toString()
- Overrides:
toString
in class Object
- See Also:
Object.toString()
-
toStringCustomizedValues
public String toStringCustomizedValues()
- Returns:
- Column family descriptor with only the customized attributes.
-
getUnit
public static PrettyPrinter.Unit getUnit(String key)
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
- See Also:
Object.hashCode()
-
readFields
@Deprecated
public void readFields(DataInput in)
throws IOException
Deprecated. Writables are going away. Use pb parseFrom(byte[])
instead.
- Throws:
IOException
-
write
@Deprecated
public void write(DataOutput out)
throws IOException
Deprecated. Writables are going away. Use toByteArray()
instead.
- Throws:
IOException
-
compareTo
public int compareTo(HColumnDescriptor o)
-
toByteArray
public byte[] toByteArray()
- Returns:
- This instance serialized with pb with pb magic prefix
- See Also:
parseFrom(byte[])
-
parseFrom
public static HColumnDescriptor parseFrom(byte[] bytes)
throws DeserializationException
- Parameters:
bytes
- A pb serialized HColumnDescriptor
instance with pb magic prefix
- Returns:
- An instance of
HColumnDescriptor
made from bytes
- Throws:
DeserializationException
- See Also:
toByteArray()
-
convert
public static HColumnDescriptor convert(HBaseProtos.ColumnFamilySchema cfs)
- Parameters:
cfs
-
- Returns:
- An
HColumnDescriptor
made from the passed in cfs
-
convert
public HBaseProtos.ColumnFamilySchema convert()
- Returns:
- Convert this instance to a the pb column family type
-
getConfigurationValue
public String getConfigurationValue(String key)
Getter for accessing the configuration value by key.
-
getConfiguration
public Map<String,String> getConfiguration()
Getter for fetching an unmodifiable configuration
map.
-
setConfiguration
public HColumnDescriptor setConfiguration(String key,
String value)
Setter for storing a configuration setting in configuration
map.
- Parameters:
key
- Config key. Same as XML config key e.g. hbase.something.or.other.
value
- String value. If null, removes the configuration.
-
removeConfiguration
public void removeConfiguration(String key)
Remove a configuration setting represented by the key from the configuration
map.
-
getEncryptionType
public String getEncryptionType()
Return the encryption algorithm in use by this family
-
setEncryptionType
public HColumnDescriptor setEncryptionType(String algorithm)
Set the encryption algorithm for use with this family
- Parameters:
algorithm
-
-
getEncryptionKey
public byte[] getEncryptionKey()
Return the raw crypto key attribute for the family, or null if not set
-
setEncryptionKey
public HColumnDescriptor setEncryptionKey(byte[] keyBytes)
Set the raw crypto key attribute for the family