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 committed by GitHub
parent 82d09904f2
commit 477debdc74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

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