HBASE-24365 MetricsTableWrapperAggregateImpl runnable fails due to exception and never runs (#1729)

Signed-off-by: binlijin <binlijin@gmail.com>
Signed-off by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
ramkrish86 2020-05-18 15:11:02 +05:30 committed by Ramkrishna Vasudevan
parent 9fd61f4774
commit 04cd6dc3f8
1 changed files with 12 additions and 5 deletions

View File

@ -76,11 +76,18 @@ public class MetricsTableWrapperAggregateImpl implements MetricsTableWrapperAggr
store.getMemStoreSize().getHeapSize() + store.getMemStoreSize().getOffHeapSize());
mt.storeFileSize += store.getStorefilesSize();
mt.referenceFileCount += store.getNumReferenceFiles();
mt.maxStoreFileAge = Math.max(mt.maxStoreFileAge, store.getMaxStoreFileAge().getAsLong());
mt.minStoreFileAge = Math.min(mt.minStoreFileAge, store.getMinStoreFileAge().getAsLong());
mt.totalStoreFileAge = (long)store.getAvgStoreFileAge().getAsDouble() *
store.getStorefilesCount();
if (store.getMaxStoreFileAge().isPresent()) {
mt.maxStoreFileAge =
Math.max(mt.maxStoreFileAge, store.getMaxStoreFileAge().getAsLong());
}
if (store.getMinStoreFileAge().isPresent()) {
mt.minStoreFileAge =
Math.min(mt.minStoreFileAge, store.getMinStoreFileAge().getAsLong());
}
if (store.getAvgStoreFileAge().isPresent()) {
mt.totalStoreFileAge =
(long) store.getAvgStoreFileAge().getAsDouble() * store.getStorefilesCount();
}
mt.storeCount += 1;
}
mt.regionCount += 1;