bbeaudreault commented on code in PR #5426:
URL: https://github.com/apache/hbase/pull/5426#discussion_r1334393122
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java:
##########
@@ -371,19 +371,21 @@ private void updateQuotaFactors() {
// Update table machine quota factors
for (TableName tableName : tableQuotaCache.keySet()) {
- double factor = 1;
- try {
- long regionSize =
tableRegionStatesCount.get(tableName).getOpenRegions();
- if (regionSize == 0) {
- factor = 0;
- } else {
- int localRegionSize = rsServices.getRegions(tableName).size();
- factor = 1.0 * localRegionSize / regionSize;
+ if (tableRegionStatesCount.containsKey(tableName)) {
Review Comment:
I had the same thought, but if you zoom out a little, the
tableRegionStatesCount is fetched from Admin.getClusterMetrics right in this
method. So it shouldn't change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]