aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_meta_cat.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-09-03 11:00:20 -0700
committerChris Lu <chris.lu@gmail.com>2020-09-03 11:00:20 -0700
commitb8f32bcab94a23cc5cb92f32fdd655a5b55ebb6d (patch)
treebde567ba06f243041e97aef31c35ccdce001d132 /weed/shell/command_fs_meta_cat.go
parentf76a2b2c8a22c97a5811e0ccf1776043ecc4a0f1 (diff)
downloadseaweedfs-b8f32bcab94a23cc5cb92f32fdd655a5b55ebb6d.tar.xz
seaweedfs-b8f32bcab94a23cc5cb92f32fdd655a5b55ebb6d.zip
filer: compress stored metadata
Diffstat (limited to 'weed/shell/command_fs_meta_cat.go')
-rw-r--r--weed/shell/command_fs_meta_cat.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/shell/command_fs_meta_cat.go b/weed/shell/command_fs_meta_cat.go
index 94ce02596..a097a3a4e 100644
--- a/weed/shell/command_fs_meta_cat.go
+++ b/weed/shell/command_fs_meta_cat.go
@@ -70,8 +70,10 @@ func (c *commandFsMetaCat) Do(args []string, commandEnv *CommandEnv, writer io.W
fmt.Fprintf(writer, "%s\n", text)
- bytes, err := proto.Marshal(respLookupEntry.Entry)
- fmt.Fprintf(writer, "chunks %d meta size: %d\n", len(respLookupEntry.Entry.Chunks), len(bytes))
+ bytes, _ := proto.Marshal(respLookupEntry.Entry)
+ gzippedBytes, _ := util.GzipData(bytes)
+ zstdBytes, _ := util.ZstdData(bytes)
+ fmt.Fprintf(writer, "chunks %d meta size: %d gzip:%d zstd:%d\n", len(respLookupEntry.Entry.Chunks), len(bytes), len(gzippedBytes), len(zstdBytes))
return nil