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:
parent
dd4417a9e2
commit
b0d49aebea
|
@ -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) + "%";
|
||||
|
||||
|
|
Loading…
Reference in New Issue