@@ -653,17 +653,17 @@ private void getAllDbStats() throws AnalysisException {
653653 dbInfo .add (String .valueOf (db .getId ()));
654654 dbInfo .add (dbName );
655655 Pair <Long , Long > usedSize = ((Database ) db ).getUsedDataSize ();
656- dbInfo .add (String . valueOf (usedSize .first ));
657- dbInfo .add (String . valueOf (usedSize .second ));
656+ dbInfo .add (DebugUtil . printByteWithUnit (usedSize .first ));
657+ dbInfo .add (DebugUtil . printByteWithUnit (usedSize .second ));
658658 totalSize += usedSize .first ;
659659 totalRemoteSize += usedSize .second ;
660660 } finally {
661661 db .readUnlock ();
662662 }
663663
664664 Pair <Long , Long > recycleSize = dbToRecycleSize .getOrDefault (db .getId (), Pair .of (0L , 0L ));
665- dbInfo .add (String . valueOf (recycleSize .first ));
666- dbInfo .add (String . valueOf (recycleSize .second ));
665+ dbInfo .add (DebugUtil . printByteWithUnit (recycleSize .first ));
666+ dbInfo .add (DebugUtil . printByteWithUnit (recycleSize .second ));
667667 totalRecycleSize += recycleSize .first ;
668668 totalRecycleRemoteSize += recycleSize .second ;
669669 dbToRecycleSize .remove (db .getId ());
@@ -677,8 +677,8 @@ private void getAllDbStats() throws AnalysisException {
677677 dbInfo .add ("NULL" );
678678 dbInfo .add ("0" );
679679 dbInfo .add ("0" );
680- dbInfo .add (String . valueOf (entry .getValue ().first ));
681- dbInfo .add (String . valueOf (entry .getValue ().second ));
680+ dbInfo .add (DebugUtil . printByteWithUnit (entry .getValue ().first ));
681+ dbInfo .add (DebugUtil . printByteWithUnit (entry .getValue ().second ));
682682 totalRecycleSize += entry .getValue ().first ;
683683 totalRecycleRemoteSize += entry .getValue ().second ;
684684 totalRows .add (dbInfo );
@@ -688,10 +688,10 @@ private void getAllDbStats() throws AnalysisException {
688688 List <String > dbInfo = new ArrayList <>();
689689 dbInfo .add ("Total" );
690690 dbInfo .add ("NULL" );
691- dbInfo .add (String . valueOf (totalSize ));
692- dbInfo .add (String . valueOf (totalRemoteSize ));
693- dbInfo .add (String . valueOf (totalRecycleSize ));
694- dbInfo .add (String . valueOf (totalRecycleRemoteSize ));
691+ dbInfo .add (DebugUtil . printByteWithUnit (totalSize ));
692+ dbInfo .add (DebugUtil . printByteWithUnit (totalRemoteSize ));
693+ dbInfo .add (DebugUtil . printByteWithUnit (totalRecycleSize ));
694+ dbInfo .add (DebugUtil . printByteWithUnit (totalRecycleRemoteSize ));
695695 totalRows .add (dbInfo );
696696 }
697697
0 commit comments