diff options
| author | Trim21 <trim21.me@gmail.com> | 2024-11-26 09:25:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-25 17:25:17 -0800 |
| commit | d43fa07f06d6c1c7fe4b91e2c045d23e2f73477e (patch) | |
| tree | 6dc75f6de3b190f63efc2ce0b8dba813729c0084 /weed/shell/command_volume_fix_replication.go | |
| parent | f965af51b748f2b3b9c81fd0c598154551a53077 (diff) | |
| download | seaweedfs-d43fa07f06d6c1c7fe4b91e2c045d23e2f73477e.tar.xz seaweedfs-d43fa07f06d6c1c7fe4b91e2c045d23e2f73477e.zip | |
use readable bytes size string in shell output (#6288)
Diffstat (limited to 'weed/shell/command_volume_fix_replication.go')
| -rw-r--r-- | weed/shell/command_volume_fix_replication.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go index 61c4ac990..0b9ed09b7 100644 --- a/weed/shell/command_volume_fix_replication.go +++ b/weed/shell/command_volume_fix_replication.go @@ -13,6 +13,8 @@ import ( "github.com/seaweedfs/seaweedfs/weed/storage/needle" "github.com/seaweedfs/seaweedfs/weed/storage/needle_map" "github.com/seaweedfs/seaweedfs/weed/storage/types" + "github.com/seaweedfs/seaweedfs/weed/util" + "golang.org/x/exp/slices" "google.golang.org/grpc" @@ -344,7 +346,7 @@ func (c *commandVolumeFixReplication) fixOneUnderReplicatedVolume(commandEnv *Co } } if resp.ProcessedBytes > 0 { - fmt.Fprintf(writer, "volume %d processed %d bytes\n", replica.info.Id, resp.ProcessedBytes) + fmt.Fprintf(writer, "volume %d processed %s bytes\n", replica.info.Id, util.BytesToHumanReadable(uint64(resp.ProcessedBytes))) } } |
