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
82d09904f2
commit
477debdc74
|
@ -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) + "%";
|
||||
|
||||
|
|
Loading…
Reference in New Issue