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:
parent
9fd61f4774
commit
04cd6dc3f8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue