@InterfaceAudience.Private public static class TableDescriptorBuilder.ModifyableTableDescriptor extends Object implements TableDescriptor, Comparable<TableDescriptorBuilder.ModifyableTableDescriptor>
COMPARATOR, COMPARATOR_IGNORE_REPLICATION| Constructor and Description |
|---|
ModifyableTableDescriptor(TableName name)
Construct a table descriptor specifying a TableName object
|
ModifyableTableDescriptor(TableName name,
TableDescriptor desc)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TableDescriptorBuilder.ModifyableTableDescriptor 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.
|
ColumnFamilyDescriptor[] |
getColumnFamilies()
Returns an unmodifiable collection of all the
ColumnFamilyDescriptor of all the column
families of the table. |
ColumnFamilyDescriptor |
getColumnFamily(byte[] column)
Returns the ColumnFamilyDescriptor 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.
|
List<CoprocessorDescriptor> |
getCoprocessorDescriptors()
Return the list of attached co-processor represented by their name className
|
Durability |
getDurability()
Returns the durability setting for the table.
|
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.
|
int |
getNormalizerTargetRegionCount()
Check if there is the target region count.
|
long |
getNormalizerTargetRegionSize()
Check if there is the target region size.
|
String |
getOwnerString()
Deprecated.
since 2.0.0 and will be removed in 3.0.0.
|
int |
getPriority() |
int |
getRegionReplication()
Returns the configured replicas per region
|
Optional<String> |
getRegionServerGroup()
Get the region server group this table belongs to.
|
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 n
|
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()
Getter for fetching an unmodifiable
values map. |
boolean |
hasColumnFamily(byte[] familyName)
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
|
int |
hashCode()
Returns hash code
|
boolean |
hasRegionMemStoreReplication()
Returns true if the read-replicas memstore replication is enabled.
|
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 |
isSplitEnabled()
Check if the split enable flag of the table is true.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
modifyColumnFamily(ColumnFamilyDescriptor family)
Modifies the existing column family.
|
ColumnFamilyDescriptor |
removeColumnFamily(byte[] column)
Removes the ColumnFamilyDescriptor with name specified by the parameter column from the table
descriptor
|
void |
removeCoprocessor(String className)
Remove a coprocessor from those set on the table
|
TableDescriptorBuilder.ModifyableTableDescriptor |
removeValue(byte[] key)
Remove metadata represented by the key from the
values map |
TableDescriptorBuilder.ModifyableTableDescriptor |
removeValue(Bytes key)
Remove metadata represented by the key from the
values map |
TableDescriptorBuilder.ModifyableTableDescriptor |
removeValue(String key)
Remove metadata represented by the key from the
values map |
TableDescriptorBuilder.ModifyableTableDescriptor |
setColumnFamily(ColumnFamilyDescriptor family)
Adds a column family.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setCompactionEnabled(boolean isEnable)
Setting the table compaction enable flag.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setCoprocessor(CoprocessorDescriptor cp)
Add a table coprocessor to this table.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setCoprocessor(String className)
Add a table coprocessor to this table.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setCoprocessorWithSpec(String specStr)
Deprecated.
used by HTableDescriptor and admin.rb. As of release 2.0.0, this will be removed
in HBase 3.0.0.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setDurability(Durability durability)
Sets the
Durability setting for the table. |
TableDescriptorBuilder.ModifyableTableDescriptor |
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.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setMaxFileSize(long maxFileSize)
Sets the maximum size upto which a region can grow to after which a region split is
triggered.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setMaxFileSize(String maxFileSize) |
TableDescriptorBuilder.ModifyableTableDescriptor |
setMemStoreFlushSize(long memstoreFlushSize)
Represents the maximum size of the memstore after which the contents of the memstore are
flushed to the filesystem.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setMemStoreFlushSize(String memStoreFlushSize) |
TableDescriptorBuilder.ModifyableTableDescriptor |
setMergeEnabled(boolean isEnable)
Setting the table region merge enable flag.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setNormalizationEnabled(boolean isEnable)
Setting the table normalization enable flag.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setNormalizerTargetRegionCount(int regionCount)
Setting the target region count of table normalization .
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setNormalizerTargetRegionSize(long regionSize)
Setting the target region size of table normalization.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setOwner(User owner)
Deprecated.
since 2.0.0 and will be removed in 3.0.0.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setOwnerString(String ownerString)
Deprecated.
since 2.0.0 and will be removed in 3.0.0.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setPriority(int priority) |
TableDescriptorBuilder.ModifyableTableDescriptor |
setReadOnly(boolean readOnly)
Setting the table as read only sets all the columns in the table as read only.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setRegionMemStoreReplication(boolean memstoreReplication)
Enable or Disable the memstore replication from the primary region to the replicas.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setRegionReplication(int regionReplication)
Sets the number of replicas per region.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setRegionSplitPolicyClassName(String clazz)
This sets the class associated with the region split policy which determines when a region
split should occur.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setSplitEnabled(boolean isEnable)
Setting the table region split enable flag.
|
TableDescriptorBuilder.ModifyableTableDescriptor |
setValue(byte[] key,
byte[] value)
Setter for storing metadata as a (key, value) pair in
values map |
TableDescriptorBuilder.ModifyableTableDescriptor |
setValue(Bytes key,
Bytes value)
Setter for storing metadata as a (key, value) pair in
values map |
TableDescriptorBuilder.ModifyableTableDescriptor |
setValue(String key,
String value) |
String |
toString()
Returns Name of this table and then a map of all of the column family descriptors.
|
String |
toStringCustomizedValues()
Returns Name of this table and then a map of all of the column family descriptors (with only
the non-default column family attributes)
|
String |
toStringTableAttributes()
Returns map of all table attributes formatted into string.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComparator, getCoprocessors, hasGlobalReplicationScope, matchReplicationScope@InterfaceAudience.Private public ModifyableTableDescriptor(TableName name)
name - Table name. TODO: make this private after removing the HTableDescriptor@InterfaceAudience.Private @Deprecated public ModifyableTableDescriptor(TableName name, TableDescriptor desc)
Makes a deep copy of the supplied descriptor.
name - The new namedesc - The descriptor. TODO: make this private after removing the HTableDescriptorpublic boolean isMetaRegion()
hbase:meta region.isMetaRegion in interface TableDescriptor hbase:meta regionpublic boolean isMetaTable()
hbase:meta tableisMetaTable in interface TableDescriptor hbase:meta region.public Bytes getValue(Bytes key)
TableDescriptorgetValue in interface TableDescriptorkey - The key.public String getValue(String key)
TableDescriptorgetValue in interface TableDescriptorkey - The key.public byte[] getValue(byte[] key)
TableDescriptorgetValue in interface TableDescriptorkey - The key.public Map<Bytes,Bytes> getValues()
values map.getValues in interface TableDescriptorvalues.valuespublic TableDescriptorBuilder.ModifyableTableDescriptor setValue(byte[] key, byte[] value)
values mapkey - The key.value - The value. If null, removes the setting.valuespublic TableDescriptorBuilder.ModifyableTableDescriptor setValue(String key, String value)
public TableDescriptorBuilder.ModifyableTableDescriptor setValue(Bytes key, Bytes value)
values mapkey - The key.value - The value. If null, removes the setting.public TableDescriptorBuilder.ModifyableTableDescriptor removeValue(String key)
values mapkey - Key whose key and value we're to remove from TableDescriptor parameters.public TableDescriptorBuilder.ModifyableTableDescriptor removeValue(Bytes key)
values mapkey - Key whose key and value we're to remove from TableDescriptor parameters.public TableDescriptorBuilder.ModifyableTableDescriptor removeValue(byte[] key)
values mapkey - Key whose key and value we're to remove from TableDescriptor parameterspublic boolean isReadOnly()
isReadOnly in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setReadOnly(boolean readOnly)
readOnly - True if all of the columns in the table should be read only.public boolean isCompactionEnabled()
isCompactionEnabled in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setCompactionEnabled(boolean isEnable)
isEnable - True if enable compaction.public boolean isSplitEnabled()
isSplitEnabled in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setSplitEnabled(boolean isEnable)
isEnable - True if enable region split.public boolean isMergeEnabled()
isMergeEnabled in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setMergeEnabled(boolean isEnable)
isEnable - True if enable region merge.public boolean isNormalizationEnabled()
isNormalizationEnabled in interface TableDescriptorpublic int getNormalizerTargetRegionCount()
getNormalizerTargetRegionCount in interface TableDescriptorpublic long getNormalizerTargetRegionSize()
getNormalizerTargetRegionSize in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setNormalizationEnabled(boolean isEnable)
isEnable - True if enable normalization.public TableDescriptorBuilder.ModifyableTableDescriptor setNormalizerTargetRegionCount(int regionCount)
regionCount - the target region count.public TableDescriptorBuilder.ModifyableTableDescriptor setNormalizerTargetRegionSize(long regionSize)
regionSize - the target region size.public TableDescriptorBuilder.ModifyableTableDescriptor setDurability(Durability durability)
Durability setting for the table. This defaults to Durability.USE_DEFAULT.durability - enum valuepublic Durability getDurability()
getDurability in interface TableDescriptorpublic TableName getTableName()
getTableName in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setRegionSplitPolicyClassName(String clazz)
clazz - the class namepublic String getRegionSplitPolicyClassName()
getRegionSplitPolicyClassName in interface TableDescriptorpublic long getMaxFileSize()
getMaxFileSize in interface TableDescriptorsetMaxFileSize(long)public TableDescriptorBuilder.ModifyableTableDescriptor 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 TableDescriptorBuilder.ModifyableTableDescriptor setMaxFileSize(String maxFileSize) throws HBaseException
HBaseExceptionpublic long getMemStoreFlushSize()
getMemStoreFlushSize in interface TableDescriptorsetMemStoreFlushSize(long)public TableDescriptorBuilder.ModifyableTableDescriptor setMemStoreFlushSize(long memstoreFlushSize)
memstoreFlushSize - memory cache flush size for each hregionpublic TableDescriptorBuilder.ModifyableTableDescriptor setMemStoreFlushSize(String memStoreFlushSize) throws HBaseException
HBaseExceptionpublic TableDescriptorBuilder.ModifyableTableDescriptor setFlushPolicyClassName(String clazz)
clazz - the class namepublic String getFlushPolicyClassName()
getFlushPolicyClassName in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setColumnFamily(ColumnFamilyDescriptor family)
modifyColumnFamily(ColumnFamilyDescriptor) instead.family - to add.public TableDescriptorBuilder.ModifyableTableDescriptor modifyColumnFamily(ColumnFamilyDescriptor family)
family - to updatepublic boolean hasColumnFamily(byte[] familyName)
hasColumnFamily in interface TableDescriptorfamilyName - Family name or column name.public String toString()
public String toStringCustomizedValues()
TableDescriptortoStringCustomizedValues in interface TableDescriptorpublic String toStringTableAttributes()
public boolean equals(Object obj)
equals in class Objectobj - The object to compareObject.equals(java.lang.Object)public int compareTo(TableDescriptorBuilder.ModifyableTableDescriptor other)
compareTo in interface Comparable<TableDescriptorBuilder.ModifyableTableDescriptor>other - The MTD to comparepublic ColumnFamilyDescriptor[] getColumnFamilies()
TableDescriptorColumnFamilyDescriptor of all the column
families of the table.getColumnFamilies in interface TableDescriptorColumnFamilyDescriptor of all the column families.public int getRegionReplication()
getRegionReplication in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor setRegionReplication(int regionReplication)
regionReplication - the replication factor per regionpublic boolean hasRegionMemStoreReplication()
hasRegionMemStoreReplication in interface TableDescriptorpublic TableDescriptorBuilder.ModifyableTableDescriptor 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 TableDescriptorBuilder.ModifyableTableDescriptor setPriority(int priority)
public int getPriority()
getPriority in interface TableDescriptorpublic Set<byte[]> getColumnFamilyNames()
getColumnFamilyNames in interface TableDescriptorpublic ColumnFamilyDescriptor getColumnFamily(byte[] column)
getColumnFamily in interface TableDescriptorcolumn - Column family namepublic ColumnFamilyDescriptor removeColumnFamily(byte[] column)
column - Name of the column family to be removed.public TableDescriptorBuilder.ModifyableTableDescriptor setCoprocessor(String className) throws IOException
className - Full class name. n * @return the modifyable TDIOExceptionpublic TableDescriptorBuilder.ModifyableTableDescriptor setCoprocessor(CoprocessorDescriptor cp) throws IOException
IOException - any illegal parameter key/value@Deprecated public TableDescriptorBuilder.ModifyableTableDescriptor setCoprocessorWithSpec(String specStr) throws IOException
specStr - The Coprocessor specification all in in one String n * @return the modifyable
TDIOExceptionpublic boolean hasCoprocessor(String classNameToMatch)
hasCoprocessor in interface TableDescriptorclassNameToMatch - - Class name of the co-processorpublic List<CoprocessorDescriptor> getCoprocessorDescriptors()
getCoprocessorDescriptors in interface TableDescriptorpublic void removeCoprocessor(String className)
className - Class name of the co-processor@Deprecated public TableDescriptorBuilder.ModifyableTableDescriptor setOwner(User owner)
@Deprecated public TableDescriptorBuilder.ModifyableTableDescriptor setOwnerString(String ownerString)
@Deprecated public String getOwnerString()
getOwnerString in interface TableDescriptorpublic int getColumnFamilyCount()
TableDescriptorgetColumnFamilyCount in interface TableDescriptorpublic Optional<String> getRegionServerGroup()
TableDescriptorRSGroupInfo.DEFAULT_GROUP.getRegionServerGroup in interface TableDescriptorCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.