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...COMPARATOR, COMPARATOR_IGNORE_REPLICATION
限定符 | 构造器和说明 |
---|---|
|
HTableDescriptor(HTableDescriptor desc)
已过时。
Construct a table descriptor by cloning the descriptor passed as a parameter.
|
protected |
HTableDescriptor(HTableDescriptor desc,
boolean deepClone)
已过时。
|
|
HTableDescriptor(TableDescriptor desc)
已过时。
|
protected |
HTableDescriptor(TableDescriptorBuilder.ModifyableTableDescriptor delegatee)
已过时。
|
|
HTableDescriptor(TableName name)
已过时。
Construct a table descriptor specifying a TableName object
|
|
HTableDescriptor(TableName name,
HTableDescriptor desc)
已过时。
Construct a table descriptor by cloning the descriptor passed as a parameter
but using a different table name.
|
限定符和类型 | 方法和说明 |
---|---|
HTableDescriptor |
addCoprocessor(String className)
已过时。
Add a table coprocessor to this table.
|
HTableDescriptor |
addCoprocessor(String className,
org.apache.hadoop.fs.Path jarFilePath,
int priority,
Map<String,String> kvs)
已过时。
Add a table coprocessor to this table.
|
HTableDescriptor |
addCoprocessorWithSpec(String specStr)
已过时。
Add a table coprocessor to this table.
|
HTableDescriptor |
addFamily(HColumnDescriptor family)
已过时。
Adds a column family.
|
int |
compareTo(HTableDescriptor other)
已过时。
Compares the descriptor with another descriptor which is passed as a parameter.
|
boolean |
equals(Object obj)
已过时。
Compare the contents of the descriptor with another one passed as a parameter.
|
HColumnDescriptor[] |
getColumnFamilies()
已过时。
since 2.0.0 and will be removed in 3.0.0.
|
ColumnFamilyDescriptor |
getColumnFamily(byte[] name)
已过时。
Returns the ColumnDescriptor for a specific column family with name as
specified by the parameter column.
|
int |
getColumnFamilyCount()
已过时。
Returns the count of the column families of the table.
|
Set<byte[]> |
getColumnFamilyNames()
已过时。
Returns all the column family names of the current table.
|
Map<String,String> |
getConfiguration()
已过时。
Getter for fetching an unmodifiable map.
|
String |
getConfigurationValue(String key)
已过时。
Getter for accessing the configuration value by key
|
Collection<CoprocessorDescriptor> |
getCoprocessorDescriptors()
已过时。
Return the list of attached co-processor represented
|
protected TableDescriptorBuilder.ModifyableTableDescriptor |
getDelegateeForModification()
已过时。
|
Durability |
getDurability()
已过时。
Returns the durability setting for the table.
|
Collection<HColumnDescriptor> |
getFamilies()
已过时。
since 2.0.0 and will be removed in 3.0.0. Use
getColumnFamilies() instead. |
Set<byte[]> |
getFamiliesKeys()
已过时。
As of release 2.0.0, this will be removed in HBase 3.0.0
(HBASE-18008).
Use
getColumnFamilyNames() . |
HColumnDescriptor |
getFamily(byte[] column)
已过时。
since 2.0.0 and will be removed in 3.0.0. Use
getColumnFamily(byte[])
instead. |
String |
getFlushPolicyClassName()
已过时。
This gets the class associated with the flush policy which determines the stores need to be
flushed when flushing a region.
|
long |
getMaxFileSize()
已过时。
Returns the maximum size upto which a region can grow to after which a region
split is triggered.
|
long |
getMemStoreFlushSize()
已过时。
Returns the size of the memstore after which a flush to filesystem is triggered.
|
String |
getNameAsString()
已过时。
Get the name of the table as a String
|
int |
getNormalizerTargetRegionCount()
已过时。
Check if there is the target region count.
|
long |
getNormalizerTargetRegionSize()
已过时。
Check if there is the target region size.
|
String |
getOwnerString()
已过时。
since 0.94.1
|
int |
getPriority()
已过时。
|
int |
getRegionReplication()
已过时。
Returns the configured replicas per region
|
String |
getRegionSplitPolicyClassName()
已过时。
This gets the class associated with the region split policy which
determines when a region split should occur.
|
TableName |
getTableName()
已过时。
Get the name of the table
|
byte[] |
getValue(byte[] key)
已过时。
Getter for accessing the metadata associated with the key.
|
Bytes |
getValue(Bytes key)
已过时。
Getter for accessing the metadata associated with the key.
|
String |
getValue(String key)
已过时。
Getter for accessing the metadata associated with the key.
|
Map<Bytes,Bytes> |
getValues()
已过时。
|
boolean |
hasColumnFamily(byte[] name)
已过时。
Checks to see if this table contains the given column family
|
boolean |
hasCoprocessor(String classNameToMatch)
已过时。
Check if the table has an attached co-processor represented by the name className
|
boolean |
hasFamily(byte[] familyName)
已过时。
Checks to see if this table contains the given column family
|
int |
hashCode()
已过时。
|
boolean |
hasRegionMemstoreReplication()
已过时。
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
hasRegionMemStoreReplication() instead |
boolean |
hasRegionMemStoreReplication()
已过时。
|
boolean |
isCompactionEnabled()
已过时。
Check if the compaction enable flag of the table is true.
|
boolean |
isMergeEnabled()
已过时。
Check if the region merge enable flag of the table is true.
|
boolean |
isMetaRegion()
已过时。
Checks if this table is
hbase:meta
region. |
boolean |
isMetaTable()
已过时。
Checks if the table is a
hbase:meta table |
boolean |
isNormalizationEnabled()
已过时。
Check if normalization enable flag of the table is true.
|
boolean |
isReadOnly()
已过时。
Check if the readOnly flag of the table is set.
|
boolean |
isRootRegion()
已过时。
This is vestigial API.
|
boolean |
isSplitEnabled()
已过时。
Check if the region split enable flag of the table is true.
|
HTableDescriptor |
modifyFamily(HColumnDescriptor family)
已过时。
Modifies the existing column family.
|
static HTableDescriptor |
parseFrom(byte[] bytes)
已过时。
|
void |
remove(byte[] key)
已过时。
Remove metadata represented by the key from the map
|
void |
remove(Bytes key)
已过时。
Remove metadata represented by the key from the map
|
void |
remove(String key)
已过时。
Remove metadata represented by the key from the map
|
void |
removeConfiguration(String key)
已过时。
Remove a config setting represented by the key from the map
|
void |
removeCoprocessor(String className)
已过时。
Remove a coprocessor from those set on the table
|
HColumnDescriptor |
removeFamily(byte[] column)
已过时。
Removes the HColumnDescriptor with name specified by the parameter column
from the table descriptor
|
HTableDescriptor |
setCompactionEnabled(boolean isEnable)
已过时。
Setting the table compaction enable flag.
|
HTableDescriptor |
setConfiguration(String key,
String value)
已过时。
Setter for storing a configuration setting in map.
|
HTableDescriptor |
setDurability(Durability durability)
已过时。
Sets the
Durability setting for the table. |
HTableDescriptor |
setFlushPolicyClassName(String clazz)
已过时。
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)
已过时。
Sets the maximum size upto which a region can grow to after which a region
split is triggered.
|
HTableDescriptor |
setMemStoreFlushSize(long memstoreFlushSize)
已过时。
Represents the maximum size of the memstore after which the contents of the
memstore are flushed to the filesystem.
|
HTableDescriptor |
setMergeEnabled(boolean isEnable)
已过时。
Setting the table region merge enable flag.
|
HTableDescriptor |
setNormalizationEnabled(boolean isEnable)
已过时。
Setting the table normalization enable flag.
|
HTableDescriptor |
setNormalizerTargetRegionCount(int regionCount)
已过时。
|
HTableDescriptor |
setNormalizerTargetRegionSize(long regionSize)
已过时。
|
HTableDescriptor |
setOwner(User owner)
已过时。
since 0.94.1
|
HTableDescriptor |
setOwnerString(String ownerString)
已过时。
since 0.94.1
|
HTableDescriptor |
setPriority(int priority)
已过时。
|
HTableDescriptor |
setReadOnly(boolean readOnly)
已过时。
Setting the table as read only sets all the columns in the table as read
only.
|
HTableDescriptor |
setRegionMemstoreReplication(boolean memstoreReplication)
已过时。
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
setRegionMemStoreReplication(boolean) instead |
HTableDescriptor |
setRegionMemStoreReplication(boolean memstoreReplication)
已过时。
Enable or Disable the memstore replication from the primary region to the replicas.
|
HTableDescriptor |
setRegionReplication(int regionReplication)
已过时。
Sets the number of replicas per region.
|
HTableDescriptor |
setRegionSplitPolicyClassName(String clazz)
已过时。
This sets the class associated with the region split policy which
determines when a region split should occur.
|
HTableDescriptor |
setSplitEnabled(boolean isEnable)
已过时。
Setting the table region split enable flag.
|
HTableDescriptor |
setValue(byte[] key,
byte[] value)
已过时。
Setter for storing metadata as a (key, value) pair in map
|
HTableDescriptor |
setValue(Bytes key,
Bytes value)
已过时。
|
HTableDescriptor |
setValue(String key,
String value)
已过时。
Setter for storing metadata as a (key, value) pair in map
|
byte[] |
toByteArray()
已过时。
|
protected HColumnDescriptor |
toHColumnDescriptor(ColumnFamilyDescriptor desc)
已过时。
Return a HColumnDescriptor for user to keep the compatibility as much as possible.
|
String |
toString()
已过时。
|
String |
toStringCustomizedValues()
已过时。
|
String |
toStringTableAttributes()
已过时。
|
getComparator, getCoprocessors, hasGlobalReplicationScope, matchReplicationScope
public static final Bytes OWNER_KEY
public static final String NORMALIZER_TARGET_REGION_COUNT
public static final String NORMALIZER_TARGET_REGION_SIZE
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 TableDescriptorBuilder.ModifyableTableDescriptor delegatee
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(TableDescriptorBuilder.ModifyableTableDescriptor delegatee)
public boolean isRootRegion()
public boolean isMetaRegion()
hbase:meta
region.isMetaRegion
在接口中 TableDescriptor
hbase:meta
regionpublic boolean isMetaTable()
hbase:meta
tableisMetaTable
在接口中 TableDescriptor
hbase:meta
region.public Map<Bytes,Bytes> getValues()
getValues
在接口中 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
在接口中 TableDescriptor
public HTableDescriptor setReadOnly(boolean readOnly)
readOnly
- True if all of the columns in the table should be read
only.public boolean isCompactionEnabled()
isCompactionEnabled
在接口中 TableDescriptor
public HTableDescriptor setCompactionEnabled(boolean isEnable)
isEnable
- True if enable compaction.public boolean isSplitEnabled()
isSplitEnabled
在接口中 TableDescriptor
public HTableDescriptor setSplitEnabled(boolean isEnable)
isEnable
- True if enable split.public boolean isMergeEnabled()
isMergeEnabled
在接口中 TableDescriptor
public HTableDescriptor setMergeEnabled(boolean isEnable)
isEnable
- True if enable merge.public boolean isNormalizationEnabled()
isNormalizationEnabled
在接口中 TableDescriptor
public HTableDescriptor setNormalizationEnabled(boolean isEnable)
isEnable
- True if enable normalization.public int getNormalizerTargetRegionCount()
TableDescriptor
getNormalizerTargetRegionCount
在接口中 TableDescriptor
public HTableDescriptor setNormalizerTargetRegionCount(int regionCount)
public long getNormalizerTargetRegionSize()
TableDescriptor
getNormalizerTargetRegionSize
在接口中 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
在接口中 TableDescriptor
public TableName getTableName()
getTableName
在接口中 TableDescriptor
public String getNameAsString()
public HTableDescriptor setRegionSplitPolicyClassName(String clazz)
clazz
- the class namepublic String getRegionSplitPolicyClassName()
getRegionSplitPolicyClassName
在接口中 TableDescriptor
public long getMaxFileSize()
getMaxFileSize
在接口中 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
在接口中 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
在接口中 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
在类中 Object
getNameAsString()
public String toStringCustomizedValues()
toStringCustomizedValues
在接口中 TableDescriptor
public String toStringTableAttributes()
public boolean equals(Object obj)
equals
在类中 Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
在类中 Object
Object.hashCode()
public int compareTo(HTableDescriptor other)
compareTo
在接口中 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
在接口中 TableDescriptor
public HTableDescriptor setRegionReplication(int regionReplication)
regionReplication
- the replication factor per region@Deprecated public boolean hasRegionMemstoreReplication()
hasRegionMemStoreReplication()
insteadpublic boolean hasRegionMemStoreReplication()
hasRegionMemStoreReplication
在接口中 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
在接口中 TableDescriptor
@Deprecated public Set<byte[]> getFamiliesKeys()
getColumnFamilyNames()
.public int getColumnFamilyCount()
getColumnFamilyCount
在接口中 TableDescriptor
@Deprecated public HColumnDescriptor[] getColumnFamilies()
HColumnDescriptor
of the column families
of the table.getColumnFamilies
在接口中 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
在接口中 TableDescriptor
classNameToMatch
- - Class name of the co-processorpublic Collection<CoprocessorDescriptor> getCoprocessorDescriptors()
TableDescriptor
getCoprocessorDescriptors
在接口中 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
在接口中 TableDescriptor
public byte[] toByteArray()
parseFrom(byte[])
public static HTableDescriptor parseFrom(byte[] bytes) throws DeserializationException, IOException
bytes
- A pb serialized HTableDescriptor
instance with pb magic prefixHTableDescriptor
made from bytes
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
在接口中 TableDescriptor
key
- The key.public String getValue(String key)
TableDescriptor
getValue
在接口中 TableDescriptor
key
- The key.public byte[] getValue(byte[] key)
TableDescriptor
getValue
在接口中 TableDescriptor
key
- The key.public Set<byte[]> getColumnFamilyNames()
TableDescriptor
getColumnFamilyNames
在接口中 TableDescriptor
public boolean hasColumnFamily(byte[] name)
TableDescriptor
hasColumnFamily
在接口中 TableDescriptor
name
- Family name or column name.public ColumnFamilyDescriptor getColumnFamily(byte[] name)
TableDescriptor
getColumnFamily
在接口中 TableDescriptor
name
- Column family nameprotected TableDescriptorBuilder.ModifyableTableDescriptor getDelegateeForModification()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.