@InterfaceAudience.Public public class TableDescriptorBuilder extends Object
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.
|
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_NORMALIZATION_ENABLED
Constant that denotes whether the table is normalized 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 String |
DURABILITY
Durability setting for the table. |
static String |
FLUSH_POLICY |
static String |
IS_META
Used by rest interface to access this metadata attribute
which denotes if it is a catalog table, either
hbase:meta . |
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.
|
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.
|
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.
|
static String |
NORMALIZER_TARGET_REGION_COUNT |
static String |
NORMALIZER_TARGET_REGION_SIZE |
static String |
OWNER |
static Bytes |
OWNER_KEY |
static String |
PRIORITY |
static String |
READONLY
Used by rest interface to access this metadata attribute
which denotes if the table is Read Only.
|
static String |
REGION_MEMSTORE_REPLICATION
The flag to indicate whether or not the memstore should be
replicated for read-replicas (CONSISTENCY => TIMELINE).
|
static String |
REGION_REPLICATION
The number of region replicas for the table.
|
static String |
SPLIT_POLICY |
public static final org.slf4j.Logger LOG
@InterfaceAudience.Private public static final String SPLIT_POLICY
@InterfaceAudience.Private public static final String MAX_FILESIZE
@InterfaceAudience.Private public static final String OWNER
@InterfaceAudience.Private public static final Bytes OWNER_KEY
@InterfaceAudience.Private public static final String READONLY
@InterfaceAudience.Private public static final String COMPACTION_ENABLED
@InterfaceAudience.Private public static final String MEMSTORE_FLUSHSIZE
@InterfaceAudience.Private public static final String FLUSH_POLICY
@InterfaceAudience.Private public static final String IS_META
hbase:meta
.@InterfaceAudience.Private public static final String DURABILITY
Durability
setting for the table.@InterfaceAudience.Private public static final String REGION_REPLICATION
@InterfaceAudience.Private public static final String REGION_MEMSTORE_REPLICATION
@InterfaceAudience.Private public static final String NORMALIZATION_ENABLED
@InterfaceAudience.Private public static final String NORMALIZER_TARGET_REGION_COUNT
@InterfaceAudience.Private public static final String NORMALIZER_TARGET_REGION_SIZE
@InterfaceAudience.Private public static final String PRIORITY
public static final boolean DEFAULT_READONLY
public static final boolean DEFAULT_COMPACTION_ENABLED
public static final boolean DEFAULT_NORMALIZATION_ENABLED
public static final long DEFAULT_MEMSTORE_FLUSH_SIZE
public static final int DEFAULT_REGION_REPLICATION
public static final boolean DEFAULT_REGION_MEMSTORE_REPLICATION
@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
public static final TableDescriptor NAMESPACE_TABLEDESC
public static byte[] toByteArray(TableDescriptor desc)
desc
- The table descriptor to serializepublic static TableDescriptor parseFrom(byte[] pbBytes) throws DeserializationException
toByteArray(org.apache.hadoop.hbase.client.TableDescriptor)
.pbBytes
- A pb serialized TableDescriptor instance with pb magic prefixDeserializationException
public 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(Bytes key)
public TableDescriptorBuilder removeValue(byte[] key)
public TableDescriptorBuilder removeColumnFamily(byte[] name)
public TableDescriptorBuilder removeCoprocessor(String className)
public TableDescriptorBuilder setCompactionEnabled(boolean isEnable)
public TableDescriptorBuilder setDurability(Durability durability)
public TableDescriptorBuilder setFlushPolicyClassName(String clazz)
public TableDescriptorBuilder setMaxFileSize(long maxFileSize)
public TableDescriptorBuilder setMemStoreFlushSize(long memstoreFlushSize)
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 TableDescriptor build()
Copyright © 2007–2019 Cloudera. All rights reserved.