You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by br...@apache.org on 2020/07/27 23:21:18 UTC
[hbase] branch branch-2 updated: HBASE-24775 [hbtop] StoreFile size
should be rounded off (#2144)
This is an automated email from the ASF dual-hosted git repository.
brfrn169 pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 2720a9d HBASE-24775 [hbtop] StoreFile size should be rounded off (#2144)
2720a9d is described below
commit 2720a9d93e134f0c3b752446069c174a79e673a1
Author: Toshihiro Suzuki <br...@gmail.com>
AuthorDate: Tue Jul 28 08:14:45 2020 +0900
HBASE-24775 [hbtop] StoreFile size should be rounded off (#2144)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Viraj Jasani <vj...@apache.org>
---
.../main/java/org/apache/hadoop/hbase/hbtop/field/FieldValue.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/field/FieldValue.java b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/field/FieldValue.java
index 6150df9..086dadc 100644
--- a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/field/FieldValue.java
+++ b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/field/FieldValue.java
@@ -175,9 +175,12 @@ public final class FieldValue implements Comparable<FieldValue> {
case INTEGER:
case LONG:
case FLOAT:
- case SIZE:
return value.toString();
+ case SIZE:
+ Size size = (Size) value;
+ return String.format("%.1f", size.get()) + size.getUnit().getSimpleName();
+
case PERCENT:
return String.format("%.2f", (Float) value) + "%";