@InterfaceAudience.Private public interface QuotaSnapshotStore<T>
Modifier and Type | Field and Description |
---|---|
static SpaceQuotaSnapshot |
NO_QUOTA
Singleton to represent a table without a quota defined.
|
Modifier and Type | Method and Description |
---|---|
Iterable<Map.Entry<RegionInfo,Long>> |
filterBySubject(T subject)
Filters the provided
regions , returning those which match the given
subject . |
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 . |
SpaceQuotaSnapshot |
getTargetState(T subject,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota)
|
void |
setCurrentState(T subject,
SpaceQuotaSnapshot state)
Persists the current
SpaceQuotaSnapshot for the subject . |
void |
setRegionUsage(Map<RegionInfo,Long> regionUsage)
Updates
this with the latest snapshot of filesystem use by region. |
static final 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 fetchedIOException
SpaceQuotaSnapshot getCurrentState(T subject)
SpaceQuotaSnapshot
for the given subject
.subject
- The object which the quota snapshot should be fetchedSpaceQuotaSnapshot getTargetState(T subject, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota) throws IOException
subject
- The object which to determine the target SpaceQuotaSnapshot ofspaceQuota
- The quota "definition" for the subject
IOException
Iterable<Map.Entry<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, SpaceQuotaSnapshot state)
SpaceQuotaSnapshot
for the subject
.subject
- The object which the SpaceQuotaSnapshot
is being persisted forstate
- The current state of the subject
void setRegionUsage(Map<RegionInfo,Long> regionUsage)
this
with the latest snapshot of filesystem use by region.regionUsage
- A map of RegionInfo
objects to their filesystem usage in bytesCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.