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>
This commit is contained in:
Toshihiro Suzuki 2020-07-28 08:14:45 +09:00
parent dd4417a9e2
commit b0d49aebea
1 changed files with 4 additions and 1 deletions

View File

@ -174,9 +174,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) + "%";