@InterfaceAudience.Private
public interface QuotaSnapshotStore<T>
| Modifier and Type | Field and Description |
|---|---|
static org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot |
NO_QUOTA
Singleton to represent a table without a quota defined.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Map.Entry<org.apache.hadoop.hbase.client.RegionInfo,Long>> |
filterBySubject(T subject)
Filters the provided
regions, returning those which match the given
subject. |
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot |
getCurrentState(T subject)
Returns the current
SpaceQuotaSnapshot for the given subject. |
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota |
getSpaceQuota(T subject)
Fetch the Quota for the given
subject. |
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot |
getTargetState(T subject,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota)
Computes the target
SpaceQuotaSnapshot for the given subject and
spaceQuota. |
void |
setCurrentState(T subject,
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot state)
Persists the current
SpaceQuotaSnapshot for the subject. |
void |
setRegionUsage(Map<org.apache.hadoop.hbase.client.RegionInfo,Long> regionUsage)
Updates
this with the latest snapshot of filesystem use by region. |
static final org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot NO_QUOTA
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota getSpaceQuota(T subject) throws IOException
subject. May be null.subject - The object for which the quota should be fetchedIOExceptionorg.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot getCurrentState(T subject)
SpaceQuotaSnapshot for the given subject.subject - The object which the quota snapshot should be fetchedorg.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot getTargetState(T subject, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota) throws IOException
SpaceQuotaSnapshot for the given subject and
spaceQuota.subject - The object which to determine the target SpaceQuotaSnapshot ofspaceQuota - The quota "definition" for the subjectIOExceptionIterable<Map.Entry<org.apache.hadoop.hbase.client.RegionInfo,Long>> filterBySubject(T subject)
regions, returning those which match the given
subject.subject - The filter criteria. Only regions belonging to this parameter will be returnedvoid setCurrentState(T subject, org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot state)
SpaceQuotaSnapshot for the subject.subject - The object which the SpaceQuotaSnapshot is being persisted forstate - The current state of the subjectCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.