@InterfaceAudience.Public public class TableDescriptorBuilder extends Object
TableDescriptor
.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_COMPACTION_ENABLED
Constant that denotes whether the table is compaction enabled by default
|
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_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
|
static String |
ERASURE_CODING_POLICY
If non-null, the HDFS erasure coding policy to set on the data dir of the table
|
static org.slf4j.Logger |
LOG |
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.
|
public static final org.slf4j.Logger LOG
public static final String ERASURE_CODING_POLICY
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
@Deprecated public static final TableDescriptor NAMESPACE_TABLEDESC
public static byte[] toByteArray(TableDescriptor desc)
public static TableDescriptor parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
toByteArray(org.apache.hadoop.hbase.client.TableDescriptor)
.pbBytes
- A pb serialized TableDescriptor instance with pb magic prefixorg.apache.hadoop.hbase.exceptions.DeserializationException
- 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 org.apache.hadoop.hbase.exceptions.HBaseException
org.apache.hadoop.hbase.exceptions.HBaseException
public TableDescriptorBuilder setMemStoreFlushSize(long memstoreFlushSize)
public TableDescriptorBuilder setMemStoreFlushSize(String memStoreFlushSize) throws org.apache.hadoop.hbase.exceptions.HBaseException
org.apache.hadoop.hbase.exceptions.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()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.