Apache9 commented on code in PR #4626:
URL: https://github.com/apache/hbase/pull/4626#discussion_r921750654
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ServerMetricsBuilder.java:
##########
@@ -414,16 +411,20 @@ public String toString() {
int currentMaxCompactedStoreFileRefCount =
r.getMaxCompactedStoreFileRefCount();
maxCompactedStoreFileRefCount =
Math.max(maxCompactedStoreFileRefCount,
currentMaxCompactedStoreFileRefCount);
- uncompressedStoreFileSizeMB +=
r.getUncompressedStoreFileSize().get(Size.Unit.MEGABYTE);
- storeFileSizeMB += r.getStoreFileSize().get(Size.Unit.MEGABYTE);
- memStoreSizeMB += r.getMemStoreSize().get(Size.Unit.MEGABYTE);
- storefileIndexSizeKB +=
r.getStoreFileUncompressedDataIndexSize().get(Size.Unit.KILOBYTE);
+ uncompressedStoreFileSizeMB = (long) (uncompressedStoreFileSizeMB
Review Comment:
Just use += and cast the right operator to long is enough?
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/CacheEvictionStats.java:
##########
@@ -28,7 +29,7 @@ public final class CacheEvictionStats {
private final long evictedBlocks;
private final long maxCacheSize;
- private final Map<byte[], Throwable> exceptions;
+ private final IdentityHashMap<byte[], Throwable> exceptions;
Review Comment:
I think this will be a bit dangerous if we will return this map to upper
layer...
--
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]