@InterfaceAudience.Public public class TableDescriptorBuilder extends Object
TableDescriptor
.Modifier and Type | Class and Description |
---|---|
static class |
TableDescriptorBuilder.ModifyableTableDescriptor
TODO: make this private after removing the HTableDescriptor
|
Modifier and Type | Field and Description |
---|---|
static String |
COMPACTION_ENABLED
Used by HBase Shell interface to access this metadata attribute which denotes if the table is
compaction enabled.
|
private static Bytes |
COMPACTION_ENABLED_KEY |
private static Pattern |
CP_HTD_ATTR_KEY_PATTERN |
private static String |
CP_HTD_ATTR_VALUE_PARAM_KEY_PATTERN |
private static Pattern |
CP_HTD_ATTR_VALUE_PARAM_PATTERN |
private static String |
CP_HTD_ATTR_VALUE_PARAM_VALUE_PATTERN |
private static Pattern |
CP_HTD_ATTR_VALUE_PATTERN
Pattern that matches a coprocessor specification.
|
static boolean |
DEFAULT_COMPACTION_ENABLED
Constant that denotes whether the table is compaction enabled by default
|
private static Durability |
DEFAULT_DURABLITY
Default durability for HTD is USE_DEFAULT, which defaults to HBase-global default value
|
static long |
DEFAULT_MEMSTORE_FLUSH_SIZE
Constant that denotes the maximum default size of the memstore in bytes after which the
contents are flushed to the store files.
|
static boolean |
DEFAULT_MERGE_ENABLED
Constant that denotes whether the table is merge enabled by default
|
static boolean |
DEFAULT_NORMALIZATION_ENABLED
Deprecated.
|
private static int |
DEFAULT_PRIORITY
Relative priority of the table used for rpc scheduling
|
static boolean |
DEFAULT_READONLY
Constant that denotes whether the table is READONLY by default and is false
|
static boolean |
DEFAULT_REGION_MEMSTORE_REPLICATION |
static int |
DEFAULT_REGION_REPLICATION |
static boolean |
DEFAULT_SPLIT_ENABLED
Constant that denotes whether the table is split enabled by default
|
private static Map<String,String> |
DEFAULT_VALUES |
private TableDescriptorBuilder.ModifyableTableDescriptor |
desc |
static String |
DURABILITY
Durability setting for the table. |
private static Bytes |
DURABILITY_KEY |
static String |
FLUSH_POLICY |
private static Bytes |
FLUSH_POLICY_KEY |
static String |
IS_META
Used by rest interface to access this metadata attribute which denotes if it is a catalog
table, either
hbase:meta . |
private static Bytes |
IS_META_KEY |
static org.slf4j.Logger |
LOG |
static String |
MAX_FILESIZE
Used by HBase Shell interface to access this metadata attribute which denotes the maximum size
of the store file after which a region split occurs.
|
private static Bytes |
MAX_FILESIZE_KEY |
static String |
MEMSTORE_FLUSHSIZE
Used by HBase Shell interface to access this metadata attribute which represents the maximum
size of the memstore after which its contents are flushed onto the disk.
|
private static Bytes |
MEMSTORE_FLUSHSIZE_KEY |
static String |
MERGE_ENABLED
Used by HBase Shell interface to access this metadata attribute which denotes if the table is
merge enabled.
|
private static Bytes |
MERGE_ENABLED_KEY |
static byte[] |
NAMESPACE_COL_DESC_BYTES |
static String |
NAMESPACE_FAMILY_INFO |
static byte[] |
NAMESPACE_FAMILY_INFO_BYTES |
static TableDescriptor |
NAMESPACE_TABLEDESC
Table descriptor for namespace table
|
static String |
NORMALIZATION_ENABLED
Used by shell/rest interface to access this metadata attribute which denotes if the table
should be treated by region normalizer.
|
private static Bytes |
NORMALIZATION_ENABLED_KEY |
static String |
NORMALIZER_TARGET_REGION_COUNT |
private static Bytes |
NORMALIZER_TARGET_REGION_COUNT_KEY |
static String |
NORMALIZER_TARGET_REGION_SIZE
Deprecated.
|
private static Bytes |
NORMALIZER_TARGET_REGION_SIZE_KEY
Deprecated.
|
static String |
NORMALIZER_TARGET_REGION_SIZE_MB |
private static Bytes |
NORMALIZER_TARGET_REGION_SIZE_MB_KEY |
static String |
OWNER |
static Bytes |
OWNER_KEY |
static String |
PRIORITY |
private static Bytes |
PRIORITY_KEY |
static String |
READONLY
Used by rest interface to access this metadata attribute which denotes if the table is Read
Only.
|
private static Bytes |
READONLY_KEY |
static String |
REGION_MEMSTORE_REPLICATION
The flag to indicate whether or not the memstore should be replicated for read-replicas
(CONSISTENCY => TIMELINE).
|
private static Bytes |
REGION_MEMSTORE_REPLICATION_KEY |
static String |
REGION_REPLICATION
The number of region replicas for the table.
|
private static Bytes |
REGION_REPLICATION_KEY |
private static Set<Bytes> |
RESERVED_KEYWORDS |
private static Bytes |
RSGROUP_KEY |
static String |
SPLIT_ENABLED
Used by HBase Shell interface to access this metadata attribute which denotes if the table is
split enabled.
|
private static Bytes |
SPLIT_ENABLED_KEY |
static String |
SPLIT_POLICY |
private static Bytes |
SPLIT_POLICY_KEY |
Modifier | Constructor and Description |
---|---|
private |
TableDescriptorBuilder(TableDescriptor desc) |
private |
TableDescriptorBuilder(TableName name) |
public static final org.slf4j.Logger LOG
@InterfaceAudience.Private public static final String SPLIT_POLICY
private static final Bytes SPLIT_POLICY_KEY
@InterfaceAudience.Private public static final String MAX_FILESIZE
private static final Bytes MAX_FILESIZE_KEY
@InterfaceAudience.Private public static final String OWNER
@InterfaceAudience.Private public static final String READONLY
private static final Bytes READONLY_KEY
@InterfaceAudience.Private public static final String COMPACTION_ENABLED
private static final Bytes COMPACTION_ENABLED_KEY
@InterfaceAudience.Private public static final String SPLIT_ENABLED
private static final Bytes SPLIT_ENABLED_KEY
@InterfaceAudience.Private public static final String MERGE_ENABLED
private static final Bytes MERGE_ENABLED_KEY
@InterfaceAudience.Private public static final String MEMSTORE_FLUSHSIZE
private static final Bytes MEMSTORE_FLUSHSIZE_KEY
@InterfaceAudience.Private public static final String FLUSH_POLICY
private static final Bytes FLUSH_POLICY_KEY
@InterfaceAudience.Private public static final String IS_META
hbase:meta
.private static final Bytes IS_META_KEY
@InterfaceAudience.Private public static final String DURABILITY
Durability
setting for the table.private static final Bytes DURABILITY_KEY
@InterfaceAudience.Private public static final String REGION_REPLICATION
private static final Bytes REGION_REPLICATION_KEY
@InterfaceAudience.Private public static final String REGION_MEMSTORE_REPLICATION
private static final Bytes REGION_MEMSTORE_REPLICATION_KEY
@InterfaceAudience.Private public static final String NORMALIZATION_ENABLED
private static final Bytes NORMALIZATION_ENABLED_KEY
@InterfaceAudience.Private @Deprecated public static final boolean DEFAULT_NORMALIZATION_ENABLED
@InterfaceAudience.Private public static final String NORMALIZER_TARGET_REGION_COUNT
private static final Bytes NORMALIZER_TARGET_REGION_COUNT_KEY
@InterfaceAudience.Private public static final String NORMALIZER_TARGET_REGION_SIZE_MB
private static final Bytes NORMALIZER_TARGET_REGION_SIZE_MB_KEY
@InterfaceAudience.Private @Deprecated public static final String NORMALIZER_TARGET_REGION_SIZE
@Deprecated private static final Bytes NORMALIZER_TARGET_REGION_SIZE_KEY
private static final Durability DEFAULT_DURABLITY
@InterfaceAudience.Private public static final String PRIORITY
private static final Bytes PRIORITY_KEY
private static final Bytes RSGROUP_KEY
private static final int DEFAULT_PRIORITY
public static final boolean DEFAULT_READONLY
public static final boolean DEFAULT_COMPACTION_ENABLED
public static final boolean DEFAULT_SPLIT_ENABLED
public static final boolean DEFAULT_MERGE_ENABLED
public static final long DEFAULT_MEMSTORE_FLUSH_SIZE
public static final int DEFAULT_REGION_REPLICATION
public static final boolean DEFAULT_REGION_MEMSTORE_REPLICATION
private static final Map<String,String> DEFAULT_VALUES
private static final Set<Bytes> RESERVED_KEYWORDS
@InterfaceAudience.Private public static final String NAMESPACE_FAMILY_INFO
@InterfaceAudience.Private public static final byte[] NAMESPACE_FAMILY_INFO_BYTES
@InterfaceAudience.Private public static final byte[] NAMESPACE_COL_DESC_BYTES
private static final Pattern CP_HTD_ATTR_VALUE_PATTERN
Pattern that matches a coprocessor specification. Form is:<coprocessor jar file location> '|' <class name> ['|' <priority> ['|' <arguments>]]
where arguments are<KEY> '=' <VALUE> [,...]
For example:hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2
private static final String CP_HTD_ATTR_VALUE_PARAM_KEY_PATTERN
private static final String CP_HTD_ATTR_VALUE_PARAM_VALUE_PATTERN
private static final Pattern CP_HTD_ATTR_VALUE_PARAM_PATTERN
private static final Pattern CP_HTD_ATTR_KEY_PATTERN
public static final TableDescriptor NAMESPACE_TABLEDESC
private final TableDescriptorBuilder.ModifyableTableDescriptor desc
private TableDescriptorBuilder(TableName name)
private TableDescriptorBuilder(TableDescriptor desc)
public static PrettyPrinter.Unit getUnit(String key)
public static byte[] toByteArray(TableDescriptor desc)
public static TableDescriptor parseFrom(byte[] pbBytes) throws DeserializationException
toByteArray(org.apache.hadoop.hbase.client.TableDescriptor)
.pbBytes
- A pb serialized TableDescriptor instance with pb magic prefixDeserializationException
- if an error occurredpublic static TableDescriptorBuilder newBuilder(TableName name)
public static TableDescriptor copy(TableDescriptor desc)
public static TableDescriptor copy(TableName name, TableDescriptor desc)
public static TableDescriptorBuilder newBuilder(TableDescriptor desc)
desc
- The desciptor to copy@Deprecated public TableDescriptorBuilder addCoprocessor(String className) throws IOException
setCoprocessor(String)
insteadIOException
@Deprecated public TableDescriptorBuilder addCoprocessor(String className, org.apache.hadoop.fs.Path jarFilePath, int priority, Map<String,String> kvs) throws IOException
setCoprocessor(CoprocessorDescriptor)
insteadIOException
@Deprecated public TableDescriptorBuilder addCoprocessorWithSpec(String specStr) throws IOException
setCoprocessor(CoprocessorDescriptor)
insteadIOException
@Deprecated public TableDescriptorBuilder addColumnFamily(ColumnFamilyDescriptor family)
setColumnFamily(ColumnFamilyDescriptor)
insteadpublic TableDescriptorBuilder setCoprocessor(String className) throws IOException
IOException
public TableDescriptorBuilder setCoprocessor(CoprocessorDescriptor cpDesc) throws IOException
IOException
public TableDescriptorBuilder setCoprocessors(Collection<CoprocessorDescriptor> cpDescs) throws IOException
IOException
public TableDescriptorBuilder setColumnFamily(ColumnFamilyDescriptor family)
public TableDescriptorBuilder setColumnFamilies(Collection<ColumnFamilyDescriptor> families)
public TableDescriptorBuilder modifyColumnFamily(ColumnFamilyDescriptor family)
public TableDescriptorBuilder removeValue(String key)
public TableDescriptorBuilder removeValue(Bytes key)
public TableDescriptorBuilder removeValue(byte[] key)
public TableDescriptorBuilder removeColumnFamily(byte[] name)
public TableDescriptorBuilder removeCoprocessor(String className)
public TableDescriptorBuilder setCompactionEnabled(boolean isEnable)
public TableDescriptorBuilder setSplitEnabled(boolean isEnable)
public TableDescriptorBuilder setMergeEnabled(boolean isEnable)
public TableDescriptorBuilder setDurability(Durability durability)
public TableDescriptorBuilder setFlushPolicyClassName(String clazz)
public TableDescriptorBuilder setMaxFileSize(long maxFileSize)
public TableDescriptorBuilder setMaxFileSize(String maxFileSize) throws HBaseException
HBaseException
public TableDescriptorBuilder setMemStoreFlushSize(long memstoreFlushSize)
public TableDescriptorBuilder setMemStoreFlushSize(String memStoreFlushSize) throws HBaseException
HBaseException
public TableDescriptorBuilder setNormalizerTargetRegionCount(int regionCount)
public TableDescriptorBuilder setNormalizerTargetRegionSize(long regionSize)
public TableDescriptorBuilder setNormalizationEnabled(boolean isEnable)
@Deprecated public TableDescriptorBuilder setOwner(User owner)
@Deprecated public TableDescriptorBuilder setOwnerString(String ownerString)
public TableDescriptorBuilder setPriority(int priority)
public TableDescriptorBuilder setReadOnly(boolean readOnly)
public TableDescriptorBuilder setRegionMemStoreReplication(boolean memstoreReplication)
public TableDescriptorBuilder setRegionReplication(int regionReplication)
public TableDescriptorBuilder setRegionSplitPolicyClassName(String clazz)
public TableDescriptorBuilder setValue(String key, String value)
public TableDescriptorBuilder setValue(Bytes key, Bytes value)
public TableDescriptorBuilder setValue(byte[] key, byte[] value)
public TableDescriptorBuilder setReplicationScope(int scope)
scope
- replication scopepublic TableDescriptorBuilder setRegionServerGroup(String group)
group
- rsgroup namepublic TableDescriptor build()
private static Optional<CoprocessorDescriptor> toCoprocessorDescriptor(String spec)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.