File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
hbase-server/src/main/resources/hbase-webapps/master Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 29
29
import =" java.util.Optional"
30
30
import =" java.util.TreeMap"
31
31
import =" java.util.concurrent.TimeUnit"
32
+ import =" java.text.DecimalFormat"
33
+ import =" java.math.RoundingMode"
32
34
import =" org.apache.commons.lang3.StringEscapeUtils"
33
35
import =" org.apache.hadoop.conf.Configuration"
34
36
import =" org.apache.hadoop.hbase.HConstants"
931
933
((float ) totalCompactedCells / totalCompactingCells)) + " %" ;
932
934
}
933
935
if (totalBlocksTotalWeight > 0 ) {
934
- totalLocality = String . format( " %.1f " ,
935
- (( float ) totalBlocksLocalWeight / totalBlocksTotalWeight) );
936
- totalLocalityForSsd = String . format(" %.1f " ,
937
- ((float ) totalBlocksLocalWithSsdWeight / totalBlocksTotalWeight));
936
+ DecimalFormat df = new DecimalFormat ( " 0.0# " );
937
+ df . setRoundingMode( RoundingMode . DOWN );
938
+ totalLocality = df . format((( float ) totalBlocksLocalWeight / totalBlocksTotalWeight));
939
+ totalLocalityForSsd = df . format( ((float ) totalBlocksLocalWithSsdWeight / totalBlocksTotalWeight));
938
940
}
939
941
if (regions != null && regions. size() > 0 ) { % >
940
942
<div class =" row" >
You can’t perform that action at this time.
0 commit comments