Interface TableDescriptor

All Known Implementing Classes:
HTableDescriptor, ImmutableHTableDescriptor, TableDescriptorBuilder.ModifyableTableDescriptor

@Public public interface TableDescriptor
TableDescriptor contains the details about an HBase table such as the descriptors of all the column families, is the table a catalog table, 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...
  • Field Details

  • Method Details

    • getComparator

    • getColumnFamilyCount

      Returns the count of the column families of the table.
      Returns:
      Count of column families of the table
    • getCoprocessorDescriptors

      Return the list of attached co-processor represented
      Returns:
      The list of CoprocessorDescriptor
    • getCoprocessors

      Deprecated.
      As of release 2.0.0, this will be removed in HBase 3.0.0. Use getCoprocessorDescriptors() instead
      Return the list of attached co-processor represented by their name className
      Returns:
      The list of co-processors classNames
    • getDurability

      Returns the durability setting for the table.
      Returns:
      durability setting for the table.
    • getColumnFamilies

      Returns an unmodifiable collection of all the ColumnFamilyDescriptor of all the column families of the table.
      Returns:
      An array of ColumnFamilyDescriptor of all the column families.
    • getColumnFamilyNames

      Returns all the column family names of the current table. The map of TableDescriptor contains mapping of family name to ColumnDescriptor. This returns all the keys of the family map which represents the column family names of the table.
      Returns:
      Immutable sorted set of the keys of the families.
    • getColumnFamily

      Returns the ColumnDescriptor for a specific column family with name as specified by the parameter column.
      Parameters:
      name - Column family name
      Returns:
      Column descriptor for the passed family name or the family on passed in column.
    • getFlushPolicyClassName

      This gets the class associated with the flush policy which determines the stores need to be flushed when flushing a region. The class used by default is defined in org.apache.hadoop.hbase.regionserver.FlushPolicy.
      Returns:
      the class name of the flush policy for this table. If this returns null, the default flush policy is used.
    • getMaxFileSize

      Returns the maximum size upto which a region can grow to after which a region split is triggered. The region size is represented by the size of the biggest store file in that region.
      Returns:
      max hregion size for table, -1 if not set.
    • getMemStoreFlushSize

      Returns the size of the memstore after which a flush to filesystem is triggered.
      Returns:
      memory cache flush size for each hregion, -1 if not set.
    • getPriority

    • getRegionReplication

      Returns Returns the configured replicas per region
    • getRegionSplitPolicyClassName

      This gets the class associated with the region split policy which determines when a region split should occur. The class used by default is defined in org.apache.hadoop.hbase.regionserver.RegionSplitPolicy
      Returns:
      the class name of the region split policy for this table. If this returns null, the default split policy is used.
    • getTableName

      Get the name of the table
    • getOwnerString

      Deprecated.
      since 2.0.0 and will be removed in 3.0.0.
      Get the owner name as a string.
      See Also:
    • getValue

      Getter for accessing the metadata associated with the key.
      Parameters:
      key - The key.
      Returns:
      A clone value. Null if no mapping for the key
    • getValue

      byte[] getValue(byte[] key)
      Getter for accessing the metadata associated with the key.
      Parameters:
      key - The key.
      Returns:
      A clone value. Null if no mapping for the key
    • getValue

      Getter for accessing the metadata associated with the key.
      Parameters:
      key - The key.
      Returns:
      Null if no mapping for the key
    • getValues

      Returns Getter for fetching an unmodifiable map.
    • hasCoprocessor

      boolean hasCoprocessor(String classNameToMatch)
      Check if the table has an attached co-processor represented by the name className
      Parameters:
      classNameToMatch - - Class name of the co-processor
      Returns:
      true of the table has a co-processor className
    • hasColumnFamily

      boolean hasColumnFamily(byte[] name)
      Checks to see if this table contains the given column family
      Parameters:
      name - Family name or column name.
      Returns:
      true if the table contains the specified family name
    • hasRegionMemStoreReplication

      Returns true if the read-replicas memstore replication is enabled.
    • isCompactionEnabled

      Check if the compaction enable flag of the table is true. If flag is false then no minor/major compactions will be done in real.
      Returns:
      true if table compaction enabled
    • isSplitEnabled

      boolean isSplitEnabled()
      Check if the split enable flag of the table is true. If flag is false then no region split will be done.
      Returns:
      true if table region split enabled
    • isMergeEnabled

      boolean isMergeEnabled()
      Check if the merge enable flag of the table is true. If flag is false then no region merge will be done.
      Returns:
      true if table region merge enabled
    • isMetaRegion

      boolean isMetaRegion()
      Checks if this table is hbase:meta region.
      Returns:
      true if this table is hbase:meta region
    • isMetaTable

      boolean isMetaTable()
      Checks if the table is a hbase:meta table
      Returns:
      true if table is hbase:meta region.
    • isNormalizationEnabled

      Check if normalization enable flag of the table is true. If flag is false then region normalizer won't attempt to normalize this table.
      Returns:
      true if region normalization is enabled for this table
    • getNormalizerTargetRegionCount

      Check if there is the target region count. If so, the normalize plan will be calculated based on the target region count.
      Returns:
      target region count after normalize done
    • getNormalizerTargetRegionSize

      Check if there is the target region size. If so, the normalize plan will be calculated based on the target region size.
      Returns:
      target region size after normalize done
    • isReadOnly

      boolean isReadOnly()
      Check if the readOnly flag of the table is set. If the readOnly flag is set then the contents of the table can only be read from but not modified.
      Returns:
      true if all columns in the table should be read only
    • getErasureCodingPolicy

      The HDFS erasure coding policy for a table. This will be set on the data dir of the table, and is an alternative to normal replication which takes less space at the cost of locality.
      Returns:
      the current policy, or null if undefined
    • 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)
    • hasGlobalReplicationScope

      default boolean hasGlobalReplicationScope()
      Check if any of the table's cfs' replication scope are set to HConstants.REPLICATION_SCOPE_GLOBAL.
      Returns:
      true if we have, otherwise false.
    • matchReplicationScope

      default boolean matchReplicationScope(boolean enabled)
      Check if the table's cfs' replication scope matched with the replication state
      Parameters:
      enabled - replication state
      Returns:
      true if matched, otherwise false
    • getRegionServerGroup

      Get the region server group this table belongs to. The regions of this table will be placed only on the region servers within this group. If not present, will be placed on RSGroupInfo.DEFAULT_GROUP.