Package org.apache.hadoop.hbase.quotas
Interface QuotaSnapshotStore<T>
- All Known Implementing Classes:
- NamespaceQuotaSnapshotStore,- TableQuotaSnapshotStore
A common interface for computing and storing space quota observance/violation for entities. An
 entity is presently a table or a namespace.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final SpaceQuotaSnapshotSingleton to represent a table without a quota defined.
- 
Method SummaryModifier and TypeMethodDescriptionfilterBySubject(T subject) Filters the providedregions, returning those which match the givensubject.getCurrentState(T subject) Returns the currentSpaceQuotaSnapshotfor the givensubject.org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuotagetSpaceQuota(T subject) Fetch the Quota for the givensubject.getTargetState(T subject, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota) voidsetCurrentState(T subject, SpaceQuotaSnapshot state) Persists the currentSpaceQuotaSnapshotfor thesubject.voidsetRegionUsage(Map<RegionInfo, Long> regionUsage) Updatesthiswith the latest snapshot of filesystem use by region.
- 
Field Details- 
NO_QUOTASingleton to represent a table without a quota defined. It is never in violation.
 
- 
- 
Method Details- 
getSpaceQuotaorg.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota getSpaceQuota(T subject) throws IOException Fetch the Quota for the givensubject. May be null.- Parameters:
- subject- The object for which the quota should be fetched
- Throws:
- IOException
 
- 
getCurrentStateReturns the currentSpaceQuotaSnapshotfor the givensubject.- Parameters:
- subject- The object which the quota snapshot should be fetched
 
- 
getTargetStateSpaceQuotaSnapshot getTargetState(T subject, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota) throws IOException - Parameters:
- subject- The object which to determine the target SpaceQuotaSnapshot of
- spaceQuota- The quota "definition" for the- subject
- Throws:
- IOException
 
- 
filterBySubjectFilters the providedregions, returning those which match the givensubject.- Parameters:
- subject- The filter criteria. Only regions belonging to this parameter will be returned
 
- 
setCurrentStatePersists the currentSpaceQuotaSnapshotfor thesubject.- Parameters:
- subject- The object which the- SpaceQuotaSnapshotis being persisted for
- state- The current state of the- subject
 
- 
setRegionUsageUpdatesthiswith the latest snapshot of filesystem use by region.- Parameters:
- regionUsage- A map of- RegionInfoobjects to their filesystem usage in bytes
 
 
-