Package org.apache.hadoop.hbase.quotas
Class QuotaCache.QuotaRefresherChore
java.lang.Object
org.apache.hadoop.hbase.ScheduledChore
org.apache.hadoop.hbase.quotas.QuotaCache.QuotaRefresherChore
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- QuotaCache
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final QuotaCache.RefreshableExpiringValueCache<Integer>private final QuotaCache.RefreshableExpiringValueCache<ClusterMetrics>
- 
Constructor SummaryConstructorsConstructorDescriptionQuotaRefresherChore(org.apache.hadoop.conf.Configuration conf, int period, Stoppable stoppable) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidchore()The task to execute on each scheduled execution of the Choreprivate voidbooleanReturns false when the Chore is not currently scheduled with a ChoreServiceprivate voidupdateMachineQuotaFactors(int rsSize) private voidThis method is cheaper thanupdateTableMachineQuotaFactors()and should be used if we don't have any table quotas in the cache.private voidUpdate quota factors which is used to divide cluster scope quota into machine scope quota For user/namespace/user over namespace quota, use [1 / RSNum] as machine factor.private voidThis will callupdateMachineQuotaFactors(int), and then update the table machine factors as well.Methods inherited from class org.apache.hadoop.hbase.ScheduledChorecancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString
- 
Field Details- 
tableRegionStatesClusterMetrics
- 
regionServersSize
 
- 
- 
Constructor Details- 
QuotaRefresherChorepublic QuotaRefresherChore(org.apache.hadoop.conf.Configuration conf, int period, Stoppable stoppable) 
 
- 
- 
Method Details- 
triggerNowDescription copied from class:ScheduledChoreReturns false when the Chore is not currently scheduled with a ChoreService- Overrides:
- triggerNowin class- ScheduledChore
 
- 
choreDescription copied from class:ScheduledChoreThe task to execute on each scheduled execution of the Chore- Specified by:
- chorein class- ScheduledChore
 
- 
fetchExceedThrottleQuota
- 
updateQuotaFactorsUpdate quota factors which is used to divide cluster scope quota into machine scope quota For user/namespace/user over namespace quota, use [1 / RSNum] as machine factor. For table/user over table quota, use [1 / TotalTableRegionNum * MachineTableRegionNum] as machine factor.
- 
updateOnlyMachineQuotaFactorsThis method is cheaper thanupdateTableMachineQuotaFactors()and should be used if we don't have any table quotas in the cache.
- 
updateTableMachineQuotaFactorsThis will callupdateMachineQuotaFactors(int), and then update the table machine factors as well. This relies on a more expensive query for ClusterMetrics.
- 
updateMachineQuotaFactors
 
-