public class TableQuotaSnapshotStore extends Object implements QuotaSnapshotStore<TableName>
QuotaSnapshotStore for tables.QuotaSnapshotStore.ViolationStateNO_QUOTA| Constructor and Description |
|---|
TableQuotaSnapshotStore(Connection conn,
QuotaObserverChore chore,
Map<HRegionInfo,Long> regionUsage) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<Map.Entry<HRegionInfo,Long>> |
filterBySubject(TableName table)
Filters the provided
regions, returning those which match the given
subject. |
SpaceQuotaSnapshot |
getCurrentState(TableName table)
Returns the current
QuotaSnapshotStore.ViolationState for the given subject. |
QuotaProtos.SpaceQuota |
getSpaceQuota(TableName subject)
Fetch the Quota for the given table.
|
SpaceQuotaSnapshot |
getTargetState(TableName table,
QuotaProtos.SpaceQuota spaceQuota)
Computes the target
QuotaSnapshotStore.ViolationState for the given subject. |
void |
setCurrentState(TableName table,
SpaceQuotaSnapshot snapshot)
Sets the current
QuotaSnapshotStore.ViolationState for the subject. |
public TableQuotaSnapshotStore(Connection conn, QuotaObserverChore chore, Map<HRegionInfo,Long> regionUsage)
public QuotaProtos.SpaceQuota getSpaceQuota(TableName subject) throws IOException
QuotaSnapshotStoregetSpaceQuota in interface QuotaSnapshotStore<TableName>IOExceptionpublic SpaceQuotaSnapshot getCurrentState(TableName table)
QuotaSnapshotStoreQuotaSnapshotStore.ViolationState for the given subject.getCurrentState in interface QuotaSnapshotStore<TableName>public SpaceQuotaSnapshot getTargetState(TableName table, QuotaProtos.SpaceQuota spaceQuota)
QuotaSnapshotStoreQuotaSnapshotStore.ViolationState for the given subject.getTargetState in interface QuotaSnapshotStore<TableName>public Iterable<Map.Entry<HRegionInfo,Long>> filterBySubject(TableName table)
QuotaSnapshotStoreregions, returning those which match the given
subject.filterBySubject in interface QuotaSnapshotStore<TableName>table - The filter criteria.public void setCurrentState(TableName table, SpaceQuotaSnapshot snapshot)
QuotaSnapshotStoreQuotaSnapshotStore.ViolationState for the subject.setCurrentState in interface QuotaSnapshotStore<TableName>