Package org.apache.hadoop.hbase.quotas
Class UserQuotaState
java.lang.Object
org.apache.hadoop.hbase.quotas.QuotaState
org.apache.hadoop.hbase.quotas.UserQuotaState
In-Memory state of the user quotas
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private Map<String,
QuotaLimiter> private Map<TableName,
QuotaLimiter> Fields inherited from class org.apache.hadoop.hbase.quotas.QuotaState
globalLimiter, lastQuery, lastUpdate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetTableLimiter
(TableName table) Return the limiter for the specified table associated with this quota.boolean
boolean
isBypass()
Returns true if there is no quota information associated to this objectprivate <K> Map<K,
QuotaLimiter> setLimiter
(Map<K, QuotaLimiter> limiters, K key, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) void
setQuotas
(String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) Add the quota information of the specified namespace.void
setQuotas
(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) Setup the global quota information.void
setQuotas
(TableName table, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) Add the quota information of the specified table.toString()
void
update
(QuotaState other) Perform an update of the quota state based on the other quota state object.private static <K> Map<K,
QuotaLimiter> updateLimiters
(Map<K, QuotaLimiter> map, Map<K, QuotaLimiter> otherMap) Methods inherited from class org.apache.hadoop.hbase.quotas.QuotaState
getGlobalLimiter, getGlobalLimiterWithoutUpdatingLastQuery, getLastQuery, getLastUpdate
-
Field Details
-
namespaceLimiters
-
tableLimiters
-
bypassGlobals
-
-
Constructor Details
-
UserQuotaState
public UserQuotaState() -
UserQuotaState
-
-
Method Details
-
toString
- Overrides:
toString
in classQuotaState
-
isBypass
Returns true if there is no quota information associated to this object- Overrides:
isBypass
in classQuotaState
-
hasBypassGlobals
-
setQuotas
Description copied from class:QuotaState
Setup the global quota information. (This operation is part of the QuotaState setup)- Overrides:
setQuotas
in classQuotaState
-
setQuotas
public void setQuotas(TableName table, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) Add the quota information of the specified table. (This operation is part of the QuotaState setup) -
setQuotas
public void setQuotas(String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) Add the quota information of the specified namespace. (This operation is part of the QuotaState setup) -
setLimiter
private <K> Map<K,QuotaLimiter> setLimiter(Map<K, QuotaLimiter> limiters, K key, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) -
update
Perform an update of the quota state based on the other quota state object. (This operation is executed by the QuotaCache)- Overrides:
update
in classQuotaState
-
updateLimiters
private static <K> Map<K,QuotaLimiter> updateLimiters(Map<K, QuotaLimiter> map, Map<K, QuotaLimiter> otherMap) -
getTableLimiter
Return the limiter for the specified table associated with this quota. If the table does not have its own quota limiter the global one will be returned. In case there is no quota limiter associated with this object a noop limiter will be returned.- Returns:
- the quota limiter for the specified table
-