@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.
|
private static Bytes |
BLOCKCACHE_BYTES |
static String |
BLOCKSIZE
Size of storefile/hfile 'blocks'.
|
private static Bytes |
BLOCKSIZE_BYTES |
static String |
BLOOMFILTER |
private static Bytes |
BLOOMFILTER_BYTES |
static String |
CACHE_BLOOMS_ON_WRITE |
private static Bytes |
CACHE_BLOOMS_ON_WRITE_BYTES |
static String |
CACHE_DATA_ON_WRITE |
private static Bytes |
CACHE_DATA_ON_WRITE_BYTES |
static String |
CACHE_INDEX_ON_WRITE |
private static Bytes |
CACHE_INDEX_ON_WRITE_BYTES |
private static byte |
COLUMN_DESCRIPTOR_VERSION |
static String |
COMPRESS_TAGS |
private static Bytes |
COMPRESS_TAGS_BYTES |
static String |
COMPRESSION |
private static Bytes |
COMPRESSION_BYTES |
static String |
COMPRESSION_COMPACT |
private static Bytes |
COMPRESSION_COMPACT_BYTES |
static String |
DATA_BLOCK_ENCODING |
private static Bytes |
DATA_BLOCK_ENCODING_BYTES |
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.
|
private static boolean |
DEFAULT_MOB |
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.
|
private static Map<String,String> |
DEFAULT_VALUES |
private ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor |
desc |
static String |
DFS_REPLICATION |
private static Bytes |
DFS_REPLICATION_BYTES |
static String |
ENCRYPTION |
private static Bytes |
ENCRYPTION_BYTES |
static String |
ENCRYPTION_KEY |
private static Bytes |
ENCRYPTION_KEY_BYTES |
static String |
EVICT_BLOCKS_ON_CLOSE |
private static Bytes |
EVICT_BLOCKS_ON_CLOSE_BYTES |
static String |
IN_MEMORY |
private static Bytes |
IN_MEMORY_BYTES |
static String |
IN_MEMORY_COMPACTION |
private static Bytes |
IN_MEMORY_COMPACTION_BYTES |
static String |
IS_MOB |
private static Bytes |
IS_MOB_BYTES |
static String |
KEEP_DELETED_CELLS
Retain all cells across flushes and compactions even if they fall behind a
delete tombstone.
|
private static Bytes |
KEEP_DELETED_CELLS_BYTES |
static String |
MAX_VERSIONS |
private static Bytes |
MAX_VERSIONS_BYTES |
static String |
MIN_VERSIONS |
private static Bytes |
MIN_VERSIONS_BYTES |
static String |
MOB_COMPACT_PARTITION_POLICY |
private static Bytes |
MOB_COMPACT_PARTITION_POLICY_BYTES |
static String |
MOB_THRESHOLD |
private static Bytes |
MOB_THRESHOLD_BYTES |
static String |
NEW_VERSION_BEHAVIOR |
private static Bytes |
NEW_VERSION_BEHAVIOR_BYTES |
static String |
PREFETCH_BLOCKS_ON_OPEN
Key for the PREFETCH_BLOCKS_ON_OPEN attribute.
|
private static Bytes |
PREFETCH_BLOCKS_ON_OPEN_BYTES |
static String |
REPLICATION_SCOPE |
private static Set<Bytes> |
RESERVED_KEYWORDS |
static String |
STORAGE_POLICY |
private static Bytes |
STORAGE_POLICY_BYTES |
static String |
TTL |
private static Bytes |
TTL_BYTES |
Modifier | Constructor and Description |
---|---|
private |
ColumnFamilyDescriptorBuilder(byte[] name) |
private |
ColumnFamilyDescriptorBuilder(ColumnFamilyDescriptor desc) |
private static final byte COLUMN_DESCRIPTOR_VERSION
@InterfaceAudience.Private public static final String IN_MEMORY_COMPACTION
private static final Bytes IN_MEMORY_COMPACTION_BYTES
@InterfaceAudience.Private public static final String IN_MEMORY
private static final Bytes IN_MEMORY_BYTES
@InterfaceAudience.Private public static final String COMPRESSION
private static final Bytes COMPRESSION_BYTES
@InterfaceAudience.Private public static final String COMPRESSION_COMPACT
private static final Bytes COMPRESSION_COMPACT_BYTES
@InterfaceAudience.Private public static final String DATA_BLOCK_ENCODING
private static final Bytes DATA_BLOCK_ENCODING_BYTES
@InterfaceAudience.Private public static final String BLOCKCACHE
private static final Bytes BLOCKCACHE_BYTES
@InterfaceAudience.Private public static final String CACHE_DATA_ON_WRITE
private static final Bytes CACHE_DATA_ON_WRITE_BYTES
@InterfaceAudience.Private public static final String CACHE_INDEX_ON_WRITE
private static final Bytes CACHE_INDEX_ON_WRITE_BYTES
@InterfaceAudience.Private public static final String CACHE_BLOOMS_ON_WRITE
private static final Bytes CACHE_BLOOMS_ON_WRITE_BYTES
@InterfaceAudience.Private public static final String EVICT_BLOCKS_ON_CLOSE
private static final Bytes EVICT_BLOCKS_ON_CLOSE_BYTES
@InterfaceAudience.Private public static final String PREFETCH_BLOCKS_ON_OPEN
private static final Bytes PREFETCH_BLOCKS_ON_OPEN_BYTES
@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).private static final Bytes BLOCKSIZE_BYTES
@InterfaceAudience.Private public static final String TTL
@InterfaceAudience.Private public static final String BLOOMFILTER
private static final Bytes BLOOMFILTER_BYTES
@InterfaceAudience.Private public static final String REPLICATION_SCOPE
@InterfaceAudience.Private public static final String MAX_VERSIONS
private static final Bytes MAX_VERSIONS_BYTES
@InterfaceAudience.Private public static final String MIN_VERSIONS
private static final Bytes MIN_VERSIONS_BYTES
@InterfaceAudience.Private public static final String KEEP_DELETED_CELLS
private static final Bytes KEEP_DELETED_CELLS_BYTES
@InterfaceAudience.Private public static final String COMPRESS_TAGS
private static final Bytes COMPRESS_TAGS_BYTES
@InterfaceAudience.Private public static final String ENCRYPTION
private static final Bytes ENCRYPTION_BYTES
@InterfaceAudience.Private public static final String ENCRYPTION_KEY
private static final Bytes ENCRYPTION_KEY_BYTES
private static final boolean DEFAULT_MOB
@InterfaceAudience.Private public static final String IS_MOB
private static final Bytes IS_MOB_BYTES
@InterfaceAudience.Private public static final String MOB_THRESHOLD
private static final Bytes MOB_THRESHOLD_BYTES
public static final long DEFAULT_MOB_THRESHOLD
@InterfaceAudience.Private public static final String MOB_COMPACT_PARTITION_POLICY
private static final Bytes MOB_COMPACT_PARTITION_POLICY_BYTES
public static final MobCompactPartitionPolicy DEFAULT_MOB_COMPACT_PARTITION_POLICY
@InterfaceAudience.Private public static final String DFS_REPLICATION
private static final Bytes DFS_REPLICATION_BYTES
public static final short DEFAULT_DFS_REPLICATION
@InterfaceAudience.Private public static final String STORAGE_POLICY
private static final Bytes STORAGE_POLICY_BYTES
public static final String NEW_VERSION_BEHAVIOR
private static final Bytes NEW_VERSION_BEHAVIOR_BYTES
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
private static final Map<String,String> DEFAULT_VALUES
private static final Set<Bytes> RESERVED_KEYWORDS
private final ColumnFamilyDescriptorBuilder.ModifyableColumnFamilyDescriptor desc
private ColumnFamilyDescriptorBuilder(byte[] name)
private ColumnFamilyDescriptorBuilder(ColumnFamilyDescriptor desc)
private static Map<Bytes,Bytes> getDefaultValuesBytes()
public static Map<String,String> getDefaultValues()
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 The Apache Software Foundation. All rights reserved.