@InterfaceAudience.Private public class TableQuotaSnapshotStore extends Object implements QuotaSnapshotStore<org.apache.hadoop.hbase.TableName>
QuotaSnapshotStore for tables.NO_QUOTA| Constructor and Description |
|---|
TableQuotaSnapshotStore(org.apache.hadoop.hbase.client.Connection conn,
QuotaObserverChore chore,
Map<org.apache.hadoop.hbase.client.RegionInfo,Long> regionUsage) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<Map.Entry<org.apache.hadoop.hbase.client.RegionInfo,Long>> |
filterBySubject(org.apache.hadoop.hbase.TableName table)
Filters the provided
regions, returning those which match the given
subject. |
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot |
getCurrentState(org.apache.hadoop.hbase.TableName table)
Returns the current
SpaceQuotaSnapshot for the given subject. |
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota |
getSpaceQuota(org.apache.hadoop.hbase.TableName subject)
Fetch the Quota for the given
subject. |
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot |
getTargetState(org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota)
Computes the target
SpaceQuotaSnapshot for the given subject and
spaceQuota. |
void |
setCurrentState(org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot snapshot)
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. |
public TableQuotaSnapshotStore(org.apache.hadoop.hbase.client.Connection conn,
QuotaObserverChore chore,
Map<org.apache.hadoop.hbase.client.RegionInfo,Long> regionUsage)
public org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota getSpaceQuota(org.apache.hadoop.hbase.TableName subject)
throws IOException
QuotaSnapshotStoresubject. May be null.getSpaceQuota in interface QuotaSnapshotStore<org.apache.hadoop.hbase.TableName>subject - The object for which the quota should be fetchedIOExceptionpublic org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot getCurrentState(org.apache.hadoop.hbase.TableName table)
QuotaSnapshotStoreSpaceQuotaSnapshot for the given subject.getCurrentState in interface QuotaSnapshotStore<org.apache.hadoop.hbase.TableName>table - The object which the quota snapshot should be fetchedpublic org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot getTargetState(org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota spaceQuota)
throws IOException
QuotaSnapshotStoreSpaceQuotaSnapshot for the given subject and
spaceQuota.getTargetState in interface QuotaSnapshotStore<org.apache.hadoop.hbase.TableName>table - The object which to determine the target SpaceQuotaSnapshot ofspaceQuota - The quota "definition" for the subjectIOExceptionpublic Iterable<Map.Entry<org.apache.hadoop.hbase.client.RegionInfo,Long>> filterBySubject(org.apache.hadoop.hbase.TableName table)
QuotaSnapshotStoreregions, returning those which match the given
subject.filterBySubject in interface QuotaSnapshotStore<org.apache.hadoop.hbase.TableName>table - The filter criteria. Only regions belonging to this parameter will be returnedpublic void setCurrentState(org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot snapshot)
QuotaSnapshotStoreSpaceQuotaSnapshot for the subject.setCurrentState in interface QuotaSnapshotStore<org.apache.hadoop.hbase.TableName>table - The object which the SpaceQuotaSnapshot is being persisted forsnapshot - The current state of the subjectpublic void setRegionUsage(Map<org.apache.hadoop.hbase.client.RegionInfo,Long> regionUsage)
QuotaSnapshotStorethis with the latest snapshot of filesystem use by region.setRegionUsage in interface QuotaSnapshotStore<org.apache.hadoop.hbase.TableName>regionUsage - A map of RegionInfo objects to their filesystem usage in bytesCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.