@InterfaceAudience.Public public class TableDescriptorBuilder extends Object
TableDescriptor
.Modifier and Type | Class and Description |
---|---|
private static class |
TableDescriptorBuilder.ModifyableTableDescriptor |
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
|
private static String |
DEFAULT_ERASURE_CODING_POLICY |
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
|
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 |
ERASURE_CODING_POLICY
If non-null, the HDFS erasure coding policy to set on the data dir of the table
|
private static Bytes |
ERASURE_CODING_POLICY_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
Deprecated.
namespace table has been folded into the ns family in meta table, do not use this
any more.
|
static String |
NAMESPACE_FAMILY_INFO
Deprecated.
namespace table has been folded into the ns family in meta table, do not use this
any more.
|
static byte[] |
NAMESPACE_FAMILY_INFO_BYTES
Deprecated.
namespace table has been folded into the ns family in meta table, do not use this
any more.
|
static TableDescriptor |
NAMESPACE_TABLEDESC
Deprecated.
since 3.0.0 and will be removed in 4.0.0. We have folded the data in namespace
table into meta table, so do not use it any more.
|
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 |
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 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
public static final String ERASURE_CODING_POLICY
private static final Bytes ERASURE_CODING_POLICY_KEY
private static final String DEFAULT_ERASURE_CODING_POLICY
@InterfaceAudience.Private public static final String NORMALIZATION_ENABLED
private static final Bytes NORMALIZATION_ENABLED_KEY
@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 @Deprecated public static final String NAMESPACE_FAMILY_INFO
@InterfaceAudience.Private @Deprecated public static final byte[] NAMESPACE_FAMILY_INFO_BYTES
@InterfaceAudience.Private @Deprecated 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
@Deprecated 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 copypublic 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 boolean hasCoprocessor(String classNameToMatch)
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 removeValue(BiPredicate<Bytes,Bytes> predicate)
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)
public TableDescriptorBuilder setPriority(int priority)
public TableDescriptorBuilder setReadOnly(boolean readOnly)
public TableDescriptorBuilder setErasureCodingPolicy(String policy)
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)
public TableDescriptor build()
private static Optional<CoprocessorDescriptor> toCoprocessorDescriptor(String spec)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.