TableDescriptorBuilder
to build HTableDescriptor
.@Deprecated @InterfaceAudience.Public public class HTableDescriptor extends Object implements TableDescriptor, Comparable<HTableDescriptor>
hbase:meta
,
if the table is read only, the maximum size of the memstore,
when the region split should occur, coprocessors associated with it etc...Modifier and Type | Field and Description |
---|---|
static String |
COMPACTION_ENABLED
Deprecated.
|
static boolean |
DEFAULT_COMPACTION_ENABLED
Deprecated.
|
static long |
DEFAULT_MEMSTORE_FLUSH_SIZE
Deprecated.
|
static boolean |
DEFAULT_NORMALIZATION_ENABLED
Deprecated.
|
static boolean |
DEFAULT_READONLY
Deprecated.
|
static boolean |
DEFAULT_REGION_MEMSTORE_REPLICATION
Deprecated.
|
static int |
DEFAULT_REGION_REPLICATION
Deprecated.
|
protected org.apache.hadoop.hbase.client.TableDescriptorBuilder.ModifyableTableDescriptor |
delegatee
Deprecated.
|
static String |
DURABILITY
Deprecated.
|
static String |
FLUSH_POLICY
Deprecated.
|
static String |
IS_META
Deprecated.
|
static String |
IS_ROOT
Deprecated.
|
static String |
MAX_FILESIZE
Deprecated.
|
static String |
MEMSTORE_FLUSHSIZE
Deprecated.
|
static String |
MERGE_ENABLED
Deprecated.
|
static byte[] |
NAMESPACE_COL_DESC_BYTES
Deprecated.
|
static String |
NAMESPACE_FAMILY_INFO
Deprecated.
|
static byte[] |
NAMESPACE_FAMILY_INFO_BYTES
Deprecated.
|
static HTableDescriptor |
NAMESPACE_TABLEDESC
Deprecated.
Table descriptor for namespace table
|
static String |
NORMALIZATION_ENABLED
Deprecated.
|
static String |
NORMALIZER_TARGET_REGION_COUNT
Deprecated.
|
static String |
NORMALIZER_TARGET_REGION_SIZE
Deprecated.
|
static String |
OWNER
Deprecated.
|
static Bytes |
OWNER_KEY
Deprecated.
|
static String |
PRIORITY
Deprecated.
|
static String |
READONLY
Deprecated.
|
static String |
REGION_MEMSTORE_REPLICATION
Deprecated.
|
static String |
REGION_REPLICATION
Deprecated.
|
static String |
SPLIT_ENABLED
Deprecated.
|
static String |
SPLIT_POLICY
Deprecated.
|
Modifier | Constructor and Description |
---|---|
|
HTableDescriptor(HTableDescriptor desc)
Deprecated.
Construct a table descriptor by cloning the descriptor passed as a parameter.
|
protected |
HTableDescriptor(HTableDescriptor desc,
boolean deepClone)
Deprecated.
|
|
HTableDescriptor(TableDescriptor desc)
Deprecated.
|
protected |
HTableDescriptor(org.apache.hadoop.hbase.client.TableDescriptorBuilder.ModifyableTableDescriptor delegatee)
Deprecated.
|
|
HTableDescriptor(TableName name)
Deprecated.
Construct a table descriptor specifying a TableName object
|
|
HTableDescriptor(TableName name,
HTableDescriptor desc)
Deprecated.
Construct a table descriptor by cloning the descriptor passed as a parameter
but using a different table name.
|
Modifier and Type | Method and Description |
---|---|
HTableDescriptor |
addCoprocessor(String className)
Deprecated.
Add a table coprocessor to this table.
|
HTableDescriptor |
addCoprocessor(String className,
org.apache.hadoop.fs.Path jarFilePath,
int priority,
Map<String,String> kvs)
Deprecated.
Add a table coprocessor to this table.
|
HTableDescriptor |
addCoprocessorWithSpec(String specStr)
Deprecated.
Add a table coprocessor to this table.
|
HTableDescriptor |
addFamily(HColumnDescriptor family)
Deprecated.
Adds a column family.
|
int |
compareTo(HTableDescriptor other)
Deprecated.
Compares the descriptor with another descriptor which is passed as a parameter.
|
boolean |
equals(Object obj)
Deprecated.
Compare the contents of the descriptor with another one passed as a parameter.
|
HColumnDescriptor[] |
getColumnFamilies()
Deprecated.
since 2.0.0 and will be removed in 3.0.0.
|
ColumnFamilyDescriptor |
getColumnFamily(byte[] name)
Deprecated.
Returns the ColumnDescriptor for a specific column family with name as
specified by the parameter column.
|
int |
getColumnFamilyCount()
Deprecated.
Returns the count of the column families of the table.
|
Set<byte[]> |
getColumnFamilyNames()
Deprecated.
Returns all the column family names of the current table.
|
Map<String,String> |
getConfiguration()
Deprecated.
Getter for fetching an unmodifiable map.
|
String |
getConfigurationValue(String key)
Deprecated.
Getter for accessing the configuration value by key
|
Collection<CoprocessorDescriptor> |
getCoprocessorDescriptors()
Deprecated.
Return the list of attached co-processor represented
|
protected org.apache.hadoop.hbase.client.TableDescriptorBuilder.ModifyableTableDescriptor |
getDelegateeForModification()
Deprecated.
|
Durability |
getDurability()
Deprecated.
Returns the durability setting for the table.
|
Collection<HColumnDescriptor> |
getFamilies()
Deprecated.
since 2.0.0 and will be removed in 3.0.0. Use
getColumnFamilies() instead. |
Set<byte[]> |
getFamiliesKeys()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
(HBASE-18008).
Use
getColumnFamilyNames() . |
HColumnDescriptor |
getFamily(byte[] column)
Deprecated.
since 2.0.0 and will be removed in 3.0.0. Use
getColumnFamily(byte[])
instead. |
String |
getFlushPolicyClassName()
Deprecated.
This gets the class associated with the flush policy which determines the stores need to be
flushed when flushing a region.
|
long |
getMaxFileSize()
Deprecated.
Returns the maximum size upto which a region can grow to after which a region
split is triggered.
|
long |
getMemStoreFlushSize()
Deprecated.
Returns the size of the memstore after which a flush to filesystem is triggered.
|
String |
getNameAsString()
Deprecated.
Get the name of the table as a String
|
int |
getNormalizerTargetRegionCount()
Deprecated.
Check if there is the target region count.
|
long |
getNormalizerTargetRegionSize()
Deprecated.
Check if there is the target region size.
|
String |
getOwnerString()
Deprecated.
since 0.94.1
|
int |
getPriority()
Deprecated.
|
int |
getRegionReplication()
Deprecated.
Returns the configured replicas per region
|
String |
getRegionSplitPolicyClassName()
Deprecated.
This gets the class associated with the region split policy which
determines when a region split should occur.
|
TableName |
getTableName()
Deprecated.
Get the name of the table
|
byte[] |
getValue(byte[] key)
Deprecated.
Getter for accessing the metadata associated with the key.
|
Bytes |
getValue(Bytes key)
Deprecated.
Getter for accessing the metadata associated with the key.
|
String |
getValue(String key)
Deprecated.
Getter for accessing the metadata associated with the key.
|
Map<Bytes,Bytes> |
getValues()
Deprecated.
|
boolean |
hasColumnFamily(byte[] name)
Deprecated.
Checks to see if this table contains the given column family
|
boolean |
hasCoprocessor(String classNameToMatch)
Deprecated.
Check if the table has an attached co-processor represented by the name className
|
boolean |
hasFamily(byte[] familyName)
Deprecated.
Checks to see if this table contains the given column family
|
int |
hashCode()
Deprecated.
|
boolean |
hasRegionMemstoreReplication()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
hasRegionMemStoreReplication() instead |
boolean |
hasRegionMemStoreReplication()
Deprecated.
|
boolean |
isCompactionEnabled()
Deprecated.
Check if the compaction enable flag of the table is true.
|
boolean |
isMergeEnabled()
Deprecated.
Check if the region merge enable flag of the table is true.
|
boolean |
isMetaRegion()
Deprecated.
Checks if this table is
hbase:meta
region. |
boolean |
isMetaTable()
Deprecated.
Checks if the table is a
hbase:meta table |
boolean |
isNormalizationEnabled()
Deprecated.
Check if normalization enable flag of the table is true.
|
boolean |
isReadOnly()
Deprecated.
Check if the readOnly flag of the table is set.
|
boolean |
isRootRegion()
Deprecated.
This is vestigial API.
|
boolean |
isSplitEnabled()
Deprecated.
Check if the region split enable flag of the table is true.
|
HTableDescriptor |
modifyFamily(HColumnDescriptor family)
Deprecated.
Modifies the existing column family.
|
static HTableDescriptor |
parseFrom(byte[] bytes)
Deprecated.
|
void |
remove(byte[] key)
Deprecated.
Remove metadata represented by the key from the map
|
void |
remove(Bytes key)
Deprecated.
Remove metadata represented by the key from the map
|
void |
remove(String key)
Deprecated.
Remove metadata represented by the key from the map
|
void |
removeConfiguration(String key)
Deprecated.
Remove a config setting represented by the key from the map
|
void |
removeCoprocessor(String className)
Deprecated.
Remove a coprocessor from those set on the table
|
HColumnDescriptor |
removeFamily(byte[] column)
Deprecated.
Removes the HColumnDescriptor with name specified by the parameter column
from the table descriptor
|
HTableDescriptor |
setCompactionEnabled(boolean isEnable)
Deprecated.
Setting the table compaction enable flag.
|
HTableDescriptor |
setConfiguration(String key,
String value)
Deprecated.
Setter for storing a configuration setting in map.
|
HTableDescriptor |
setDurability(Durability durability)
Deprecated.
Sets the
Durability setting for the table. |
HTableDescriptor |
setFlushPolicyClassName(String clazz)
Deprecated.
This sets the class associated with the flush policy which determines determines the stores
need to be flushed when flushing a region.
|
HTableDescriptor |
setMaxFileSize(long maxFileSize)
Deprecated.
Sets the maximum size upto which a region can grow to after which a region
split is triggered.
|
HTableDescriptor |
setMemStoreFlushSize(long memstoreFlushSize)
Deprecated.
Represents the maximum size of the memstore after which the contents of the
memstore are flushed to the filesystem.
|
HTableDescriptor |
setMergeEnabled(boolean isEnable)
Deprecated.
Setting the table region merge enable flag.
|
HTableDescriptor |
setNormalizationEnabled(boolean isEnable)
Deprecated.
Setting the table normalization enable flag.
|
HTableDescriptor |
setNormalizerTargetRegionCount(int regionCount)
Deprecated.
|
HTableDescriptor |
setNormalizerTargetRegionSize(long regionSize)
Deprecated.
|
HTableDescriptor |
setOwner(User owner)
Deprecated.
since 0.94.1
|
HTableDescriptor |
setOwnerString(String ownerString)
Deprecated.
since 0.94.1
|
HTableDescriptor |
setPriority(int priority)
Deprecated.
|
HTableDescriptor |
setReadOnly(boolean readOnly)
Deprecated.
Setting the table as read only sets all the columns in the table as read
only.
|
HTableDescriptor |
setRegionMemstoreReplication(boolean memstoreReplication)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
setRegionMemStoreReplication(boolean) instead |
HTableDescriptor |
setRegionMemStoreReplication(boolean memstoreReplication)
Deprecated.
Enable or Disable the memstore replication from the primary region to the replicas.
|
HTableDescriptor |
setRegionReplication(int regionReplication)
Deprecated.
Sets the number of replicas per region.
|
HTableDescriptor |
setRegionSplitPolicyClassName(String clazz)
Deprecated.
This sets the class associated with the region split policy which
determines when a region split should occur.
|
HTableDescriptor |
setSplitEnabled(boolean isEnable)
Deprecated.
Setting the table region split enable flag.
|
HTableDescriptor |
setValue(byte[] key,
byte[] value)
Deprecated.
Setter for storing metadata as a (key, value) pair in map
|
HTableDescriptor |
setValue(Bytes key,
Bytes value)
Deprecated.
|
HTableDescriptor |
setValue(String key,
String value)
Deprecated.
Setter for storing metadata as a (key, value) pair in map
|
byte[] |
toByteArray()
Deprecated.
|
protected HColumnDescriptor |
toHColumnDescriptor(ColumnFamilyDescriptor desc)
Deprecated.
Return a HColumnDescriptor for user to keep the compatibility as much as possible.
|
String |
toString()
Deprecated.
|
String |
toStringCustomizedValues()
Deprecated.
|
String |
toStringTableAttributes()
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComparator, getCoprocessors, hasGlobalReplicationScope, matchReplicationScope
public static final String SPLIT_POLICY
public static final String MAX_FILESIZE
public static final String OWNER
public static final String READONLY
public static final String COMPACTION_ENABLED
public static final String SPLIT_ENABLED
public static final String MERGE_ENABLED
public static final String MEMSTORE_FLUSHSIZE
public static final String FLUSH_POLICY
public static final String IS_ROOT
public static final String IS_META
public static final String DURABILITY
public static final String REGION_REPLICATION
public static final String REGION_MEMSTORE_REPLICATION
public static final String NORMALIZATION_ENABLED
public static final String NORMALIZER_TARGET_REGION_COUNT
public static final String NORMALIZER_TARGET_REGION_SIZE
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
protected final org.apache.hadoop.hbase.client.TableDescriptorBuilder.ModifyableTableDescriptor delegatee
public static final String NAMESPACE_FAMILY_INFO
public static final byte[] NAMESPACE_FAMILY_INFO_BYTES
public static final byte[] NAMESPACE_COL_DESC_BYTES
public static final HTableDescriptor NAMESPACE_TABLEDESC
public HTableDescriptor(TableName name)
name
- Table name.public HTableDescriptor(HTableDescriptor desc)
Makes a deep copy of the supplied descriptor. Can make a modifiable descriptor from an ImmutableHTableDescriptor.
desc
- The descriptor.protected HTableDescriptor(HTableDescriptor desc, boolean deepClone)
public HTableDescriptor(TableDescriptor desc)
public HTableDescriptor(TableName name, HTableDescriptor desc)
Makes a deep copy of the supplied descriptor. Can make a modifiable descriptor from an ImmutableHTableDescriptor.
name
- Table name.desc
- The descriptor.protected HTableDescriptor(org.apache.hadoop.hbase.client.TableDescriptorBuilder.ModifyableTableDescriptor delegatee)
public boolean isRootRegion()
public boolean isMetaRegion()
hbase:meta
region.isMetaRegion
in interface TableDescriptor
hbase:meta
regionpublic boolean isMetaTable()
hbase:meta
tableisMetaTable
in interface TableDescriptor
hbase:meta
region.public Map<Bytes,Bytes> getValues()
getValues
in interface TableDescriptor
public HTableDescriptor setValue(byte[] key, byte[] value)
key
- The key.value
- The value. If null, removes the setting.public HTableDescriptor setValue(Bytes key, Bytes value)
public HTableDescriptor setValue(String key, String value)
key
- The key.value
- The value. If null, removes the setting.public void remove(String key)
key
- Key whose key and value we're to remove from HTableDescriptor
parameters.public void remove(Bytes key)
key
- Key whose key and value we're to remove from HTableDescriptor
parameters.public void remove(byte[] key)
key
- Key whose key and value we're to remove from HTableDescriptor
parameters.public boolean isReadOnly()
isReadOnly
in interface TableDescriptor
public HTableDescriptor setReadOnly(boolean readOnly)
readOnly
- True if all of the columns in the table should be read
only.public boolean isCompactionEnabled()
isCompactionEnabled
in interface TableDescriptor
public HTableDescriptor setCompactionEnabled(boolean isEnable)
isEnable
- True if enable compaction.public boolean isSplitEnabled()
isSplitEnabled
in interface TableDescriptor
public HTableDescriptor setSplitEnabled(boolean isEnable)
isEnable
- True if enable split.public boolean isMergeEnabled()
isMergeEnabled
in interface TableDescriptor
public HTableDescriptor setMergeEnabled(boolean isEnable)
isEnable
- True if enable merge.public boolean isNormalizationEnabled()
isNormalizationEnabled
in interface TableDescriptor
public HTableDescriptor setNormalizationEnabled(boolean isEnable)
isEnable
- True if enable normalization.public int getNormalizerTargetRegionCount()
TableDescriptor
getNormalizerTargetRegionCount
in interface TableDescriptor
public HTableDescriptor setNormalizerTargetRegionCount(int regionCount)
public long getNormalizerTargetRegionSize()
TableDescriptor
getNormalizerTargetRegionSize
in interface TableDescriptor
public HTableDescriptor setNormalizerTargetRegionSize(long regionSize)
public HTableDescriptor setDurability(Durability durability)
Durability
setting for the table. This defaults to Durability.USE_DEFAULT.durability
- enum valuepublic Durability getDurability()
getDurability
in interface TableDescriptor
public TableName getTableName()
getTableName
in interface TableDescriptor
public String getNameAsString()
public HTableDescriptor setRegionSplitPolicyClassName(String clazz)
clazz
- the class namepublic String getRegionSplitPolicyClassName()
getRegionSplitPolicyClassName
in interface TableDescriptor
public long getMaxFileSize()
getMaxFileSize
in interface TableDescriptor
setMaxFileSize(long)
public HTableDescriptor setMaxFileSize(long maxFileSize)
This is not an absolute value and might vary. Assume that a single row exceeds the maxFileSize then the storeFileSize will be greater than maxFileSize since a single row cannot be split across multiple regions
maxFileSize
- The maximum file size that a store file can grow to
before a split is triggered.public long getMemStoreFlushSize()
getMemStoreFlushSize
in interface TableDescriptor
setMemStoreFlushSize(long)
public HTableDescriptor setMemStoreFlushSize(long memstoreFlushSize)
memstoreFlushSize
- memory cache flush size for each hregionpublic HTableDescriptor setFlushPolicyClassName(String clazz)
clazz
- the class namepublic String getFlushPolicyClassName()
getFlushPolicyClassName
in interface TableDescriptor
public HTableDescriptor addFamily(HColumnDescriptor family)
modifyFamily(HColumnDescriptor)
instead.family
- HColumnDescriptor of family to add.public HTableDescriptor modifyFamily(HColumnDescriptor family)
family
- HColumnDescriptor of family to updatepublic boolean hasFamily(byte[] familyName)
familyName
- Family name or column name.public String toString()
toString
in class Object
getNameAsString()
public String toStringCustomizedValues()
toStringCustomizedValues
in interface TableDescriptor
public String toStringTableAttributes()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public int compareTo(HTableDescriptor other)
compareTo
in interface Comparable<HTableDescriptor>
@Deprecated public Collection<HColumnDescriptor> getFamilies()
getColumnFamilies()
instead.HColumnDescriptor
of all the column families of the table.HColumnDescriptor
of all the
column families.getColumnFamilies()
,
HBASE-18008public int getRegionReplication()
getRegionReplication
in interface TableDescriptor
public HTableDescriptor setRegionReplication(int regionReplication)
regionReplication
- the replication factor per region@Deprecated public boolean hasRegionMemstoreReplication()
hasRegionMemStoreReplication()
insteadpublic boolean hasRegionMemStoreReplication()
hasRegionMemStoreReplication
in interface TableDescriptor
@Deprecated public HTableDescriptor setRegionMemstoreReplication(boolean memstoreReplication)
setRegionMemStoreReplication(boolean)
insteadpublic HTableDescriptor setRegionMemStoreReplication(boolean memstoreReplication)
memstoreReplication
- true if the new data written to the primary region
should be replicated.
false if the secondaries can tollerate to have new
data only when the primary flushes the memstore.public HTableDescriptor setPriority(int priority)
public int getPriority()
getPriority
in interface TableDescriptor
@Deprecated public Set<byte[]> getFamiliesKeys()
getColumnFamilyNames()
.public int getColumnFamilyCount()
getColumnFamilyCount
in interface TableDescriptor
@Deprecated public HColumnDescriptor[] getColumnFamilies()
HColumnDescriptor
of the column families
of the table.getColumnFamilies
in interface TableDescriptor
getFamilies()
,
HBASE-18008@Deprecated public HColumnDescriptor getFamily(byte[] column)
getColumnFamily(byte[])
instead.column
- Column family namegetColumnFamily(byte[])
,
HBASE-18008public HColumnDescriptor removeFamily(byte[] column)
column
- Name of the column family to be removed.protected HColumnDescriptor toHColumnDescriptor(ColumnFamilyDescriptor desc)
desc
- read-only ColumnFamilyDescriptorpublic HTableDescriptor addCoprocessor(String className) throws IOException
className
- Full class name.IOException
public HTableDescriptor addCoprocessor(String className, org.apache.hadoop.fs.Path jarFilePath, int priority, Map<String,String> kvs) throws IOException
jarFilePath
- Path of the jar file. If it's null, the class will be
loaded from default classloader.className
- Full class name.priority
- Prioritykvs
- Arbitrary key-value parameter pairs passed into the coprocessor.IOException
public HTableDescriptor addCoprocessorWithSpec(String specStr) throws IOException
specStr
- The Coprocessor specification all in in one String formatted so matches
HConstants.CP_HTD_ATTR_VALUE_PATTERN
IOException
public boolean hasCoprocessor(String classNameToMatch)
hasCoprocessor
in interface TableDescriptor
classNameToMatch
- - Class name of the co-processorpublic Collection<CoprocessorDescriptor> getCoprocessorDescriptors()
TableDescriptor
getCoprocessorDescriptors
in interface TableDescriptor
public void removeCoprocessor(String className)
className
- Class name of the co-processor@Deprecated public HTableDescriptor setOwner(User owner)
@Deprecated public HTableDescriptor setOwnerString(String ownerString)
@Deprecated public String getOwnerString()
getOwnerString
in interface TableDescriptor
public byte[] toByteArray()
parseFrom(byte[])
public static HTableDescriptor parseFrom(byte[] bytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException, IOException
bytes
- A pb serialized HTableDescriptor
instance with pb magic prefixHTableDescriptor
made from bytes
org.apache.hadoop.hbase.exceptions.DeserializationException
IOException
toByteArray()
public String getConfigurationValue(String key)
public Map<String,String> getConfiguration()
public HTableDescriptor setConfiguration(String key, String value)
key
- Config key. Same as XML config key e.g. hbase.something.or.other.value
- String value. If null, removes the setting.public void removeConfiguration(String key)
public Bytes getValue(Bytes key)
TableDescriptor
getValue
in interface TableDescriptor
key
- The key.public String getValue(String key)
TableDescriptor
getValue
in interface TableDescriptor
key
- The key.public byte[] getValue(byte[] key)
TableDescriptor
getValue
in interface TableDescriptor
key
- The key.public Set<byte[]> getColumnFamilyNames()
TableDescriptor
getColumnFamilyNames
in interface TableDescriptor
public boolean hasColumnFamily(byte[] name)
TableDescriptor
hasColumnFamily
in interface TableDescriptor
name
- Family name or column name.public ColumnFamilyDescriptor getColumnFamily(byte[] name)
TableDescriptor
getColumnFamily
in interface TableDescriptor
name
- Column family nameprotected org.apache.hadoop.hbase.client.TableDescriptorBuilder.ModifyableTableDescriptor getDelegateeForModification()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.