@InterfaceAudience.Public public class ColumnFamilyDescriptorBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor
An ModifyableFamilyDescriptor contains information about a column family such as the
number of versions, compression settings, etc.
|
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_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 BloomType |
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_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 Compression.Algorithm |
DEFAULT_COMPRESSION
Default compression type.
|
static DataBlockEncoding |
DEFAULT_DATA_BLOCK_ENCODING
Default data block encoding algorithm.
|
static short |
DEFAULT_DFS_REPLICATION |
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_MAX_VERSIONS
Default number of versions of a record to keep.
|
static int |
DEFAULT_MIN_VERSIONS
Default is not to keep a minimum of versions.
|
static MobCompactPartitionPolicy |
DEFAULT_MOB_COMPACT_PARTITION_POLICY |
static long |
DEFAULT_MOB_THRESHOLD |
static boolean |
DEFAULT_NEW_VERSION_BEHAVIOR |
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 String |
DFS_REPLICATION |
static String |
ENCRYPTION |
static String |
ENCRYPTION_KEY |
static String |
EVICT_BLOCKS_ON_CLOSE |
static String |
IN_MEMORY |
static String |
IN_MEMORY_COMPACTION |
static String |
IS_MOB |
static String |
KEEP_DELETED_CELLS
Retain all cells across flushes and compactions even if they fall behind a
delete tombstone.
|
static String |
MAX_VERSIONS |
static String |
MIN_VERSIONS |
static String |
MOB_COMPACT_PARTITION_POLICY |
static String |
MOB_THRESHOLD |
static String |
NEW_VERSION_BEHAVIOR |
static String |
PREFETCH_BLOCKS_ON_OPEN
Key for the PREFETCH_BLOCKS_ON_OPEN attribute.
|
static String |
REPLICATION_SCOPE |
static String |
STORAGE_POLICY |
static String |
TTL |
@InterfaceAudience.Private public static final String IN_MEMORY_COMPACTION
@InterfaceAudience.Private public static final String IN_MEMORY
@InterfaceAudience.Private public static final String COMPRESSION
@InterfaceAudience.Private public static final String COMPRESSION_COMPACT
@InterfaceAudience.Private public static final String DATA_BLOCK_ENCODING
@InterfaceAudience.Private public static final String BLOCKCACHE
@InterfaceAudience.Private public static final String CACHE_DATA_ON_WRITE
@InterfaceAudience.Private public static final String CACHE_INDEX_ON_WRITE
@InterfaceAudience.Private public static final String CACHE_BLOOMS_ON_WRITE
@InterfaceAudience.Private public static final String EVICT_BLOCKS_ON_CLOSE
@InterfaceAudience.Private public static final String PREFETCH_BLOCKS_ON_OPEN
@InterfaceAudience.Private public static final String BLOCKSIZE
DEFAULT_BLOCKSIZE
.
Use smaller block sizes for faster random-access at expense of larger
indices (more memory consumption). Note that this is a soft limit and that
blocks have overhead (metadata, CRCs) so blocks will tend to be the size
specified here and then some; i.e. don't expect that setting BLOCKSIZE=4k
means hbase data will align with an SSDs 4k page accesses (TODO).@InterfaceAudience.Private public static final String TTL
@InterfaceAudience.Private public static final String BLOOMFILTER
@InterfaceAudience.Private public static final String REPLICATION_SCOPE
@InterfaceAudience.Private public static final String MAX_VERSIONS
@InterfaceAudience.Private public static final String MIN_VERSIONS
@InterfaceAudience.Private public static final String KEEP_DELETED_CELLS
@InterfaceAudience.Private public static final String COMPRESS_TAGS
@InterfaceAudience.Private public static final String ENCRYPTION
@InterfaceAudience.Private public static final String ENCRYPTION_KEY
@InterfaceAudience.Private public static final String IS_MOB
@InterfaceAudience.Private public static final String MOB_THRESHOLD
public static final long DEFAULT_MOB_THRESHOLD
@InterfaceAudience.Private public static final String MOB_COMPACT_PARTITION_POLICY
public static final MobCompactPartitionPolicy DEFAULT_MOB_COMPACT_PARTITION_POLICY
@InterfaceAudience.Private public static final String DFS_REPLICATION
public static final short DEFAULT_DFS_REPLICATION
@InterfaceAudience.Private public static final String STORAGE_POLICY
public static final String NEW_VERSION_BEHAVIOR
public static final boolean DEFAULT_NEW_VERSION_BEHAVIOR
public static final Compression.Algorithm DEFAULT_COMPRESSION
public static final DataBlockEncoding DEFAULT_DATA_BLOCK_ENCODING
public static final int DEFAULT_MAX_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_INDEX_ON_WRITE
public static final int DEFAULT_BLOCKSIZE
public static final BloomType 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
public static PrettyPrinter.Unit getUnit(String key)
public static byte[] isLegalColumnFamilyName(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 static ColumnFamilyDescriptor parseFrom(byte[] pbBytes) throws DeserializationException
DeserializationException
public static ColumnFamilyDescriptorBuilder newBuilder(byte[] name)
public static ColumnFamilyDescriptorBuilder newBuilder(ColumnFamilyDescriptor desc)
public static ColumnFamilyDescriptor copy(ColumnFamilyDescriptor desc)
public static ColumnFamilyDescriptor of(String name)
public static ColumnFamilyDescriptor of(byte[] name)
public static byte[] toByteArray(ColumnFamilyDescriptor desc)
desc
- The table descriptor to serializepublic ColumnFamilyDescriptor build()
public ColumnFamilyDescriptorBuilder removeConfiguration(String key)
public String getNameAsString()
public ColumnFamilyDescriptorBuilder setBlockCacheEnabled(boolean value)
public ColumnFamilyDescriptorBuilder setBlocksize(int value)
public ColumnFamilyDescriptorBuilder setBloomFilterType(BloomType value)
public ColumnFamilyDescriptorBuilder setCacheBloomsOnWrite(boolean value)
public ColumnFamilyDescriptorBuilder setCacheDataOnWrite(boolean value)
public ColumnFamilyDescriptorBuilder setCacheIndexesOnWrite(boolean value)
public ColumnFamilyDescriptorBuilder setCompactionCompressionType(Compression.Algorithm value)
public ColumnFamilyDescriptorBuilder setCompressTags(boolean value)
public ColumnFamilyDescriptorBuilder setCompressionType(Compression.Algorithm value)
public Compression.Algorithm getCompressionType()
public ColumnFamilyDescriptorBuilder setConfiguration(String key, String value)
public ColumnFamilyDescriptorBuilder setDFSReplication(short value)
public ColumnFamilyDescriptorBuilder setDataBlockEncoding(DataBlockEncoding value)
public ColumnFamilyDescriptorBuilder setEncryptionKey(byte[] value)
public ColumnFamilyDescriptorBuilder setEncryptionType(String value)
public ColumnFamilyDescriptorBuilder setEvictBlocksOnClose(boolean value)
public ColumnFamilyDescriptorBuilder setInMemory(boolean value)
public ColumnFamilyDescriptorBuilder setInMemoryCompaction(MemoryCompactionPolicy value)
public ColumnFamilyDescriptorBuilder setKeepDeletedCells(KeepDeletedCells value)
public ColumnFamilyDescriptorBuilder setMaxVersions(int value)
public ColumnFamilyDescriptorBuilder setMinVersions(int value)
public ColumnFamilyDescriptorBuilder setMobCompactPartitionPolicy(MobCompactPartitionPolicy value)
public ColumnFamilyDescriptorBuilder setMobEnabled(boolean value)
public ColumnFamilyDescriptorBuilder setMobThreshold(long value)
public ColumnFamilyDescriptorBuilder setPrefetchBlocksOnOpen(boolean value)
public ColumnFamilyDescriptorBuilder setScope(int value)
public ColumnFamilyDescriptorBuilder setStoragePolicy(String value)
public ColumnFamilyDescriptorBuilder setTimeToLive(int value)
public ColumnFamilyDescriptorBuilder setTimeToLive(String value) throws HBaseException
HBaseException
public ColumnFamilyDescriptorBuilder setNewVersionBehavior(boolean value)
public ColumnFamilyDescriptorBuilder setValue(Bytes key, Bytes value)
public ColumnFamilyDescriptorBuilder setValue(byte[] key, byte[] value)
public ColumnFamilyDescriptorBuilder setValue(String key, String value)
Copyright © 2007–2019 Cloudera. All rights reserved.