hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brfrn...@apache.org
Subject [hbase] branch branch-2.3 updated: HBASE-24775 [hbtop] StoreFile size should be rounded off (#2144)
Date Mon, 27 Jul 2020 23:29:06 GMT
This is an automated email from the ASF dual-hosted git repository.

brfrn169 pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new ece0792  HBASE-24775 [hbtop] StoreFile size should be rounded off (#2144)
ece0792 is described below

commit ece0792bf4f7e04a04a83536ef279e62398219b3
Author: Toshihiro Suzuki <brfrn169@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 <zhangduo@apache.org>
    Signed-off-by: Viraj Jasani <vjasani@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) + "%";
 


Mime
View raw message