Package org.apache.hadoop.hbase.quotas
Class QuotaObserverChore.TablesWithQuotas
java.lang.Object
org.apache.hadoop.hbase.quotas.QuotaObserverChore.TablesWithQuotas
- Enclosing class:
- QuotaObserverChore
A container which encapsulates the tables that have either a table quota or are contained in a
namespace which have a namespace quota.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configuration
private final Connection
-
Constructor Summary
ConstructorDescriptionTablesWithQuotas
(Connection conn, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a table with a namespace quota.void
Adds a table with a table quota.Filters out all tables for which the Master currently doesn't have enough region space reports received from RegionServers yet.(package private) org.apache.hadoop.conf.Configuration
Returns an unmodifiable view of all tables in namespaces that have namespace quotas.(package private) int
getNumRegions
(TableName table) Computes the total number of regions in a table.(package private) int
getNumReportedRegions
(TableName table, QuotaSnapshotStore<TableName> tableStore) Computes the number of regions reported for a table.Returns an unmodifiable view of all tables with table quotas.Returns a view of all tables that reside in a namespace with a namespace quota, grouped by the namespace itself.boolean
Returns true if the table exists in a namespace with a namespace quota.boolean
Returns true if the given table has a table quota.toString()
-
Field Details
-
tablesWithTableQuotas
-
tablesWithNamespaceQuotas
-
conn
-
conf
-
-
Constructor Details
-
TablesWithQuotas
-
-
Method Details
-
getConfiguration
org.apache.hadoop.conf.Configuration getConfiguration() -
addTableQuotaTable
Adds a table with a table quota. -
addNamespaceQuotaTable
Adds a table with a namespace quota. -
hasTableQuota
Returns true if the given table has a table quota. -
hasNamespaceQuota
Returns true if the table exists in a namespace with a namespace quota. -
getTableQuotaTables
Returns an unmodifiable view of all tables with table quotas. -
getNamespaceQuotaTables
Returns an unmodifiable view of all tables in namespaces that have namespace quotas. -
getNamespacesWithQuotas
-
getTablesByNamespace
public org.apache.hbase.thirdparty.com.google.common.collect.Multimap<String,TableName> getTablesByNamespace()Returns a view of all tables that reside in a namespace with a namespace quota, grouped by the namespace itself. -
filterInsufficientlyReportedTables
public Set<TableName> filterInsufficientlyReportedTables(QuotaSnapshotStore<TableName> tableStore) throws IOException Filters out all tables for which the Master currently doesn't have enough region space reports received from RegionServers yet.- Throws:
IOException
-
getNumRegions
Computes the total number of regions in a table.- Throws:
IOException
-
getNumReportedRegions
int getNumReportedRegions(TableName table, QuotaSnapshotStore<TableName> tableStore) throws IOException Computes the number of regions reported for a table.- Throws:
IOException
-
toString
-