diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-11-21 15:15:40 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-11-21 15:15:40 -0800 |
| commit | c9b3ef58dea146e8a39a6c78c0aba4354c1d3d08 (patch) | |
| tree | 57e6e7782017bf76b9c9d37bbad3bae0dc318add | |
| parent | 2f2e417b683c99a3bab5bab18db5ef28f930622c (diff) | |
| download | seaweedfs-c9b3ef58dea146e8a39a6c78c0aba4354c1d3d08.tar.xz seaweedfs-c9b3ef58dea146e8a39a6c78c0aba4354c1d3d08.zip | |
options to control filer.export verbosity
| -rw-r--r-- | weed/command/filer_export.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/weed/command/filer_export.go b/weed/command/filer_export.go index 8a709ed1f..14465d61b 100644 --- a/weed/command/filer_export.go +++ b/weed/command/filer_export.go @@ -37,6 +37,7 @@ var ( dir = cmdFilerExport.Flag.String("dir", "/", "only process files under this directory") dirListLimit = cmdFilerExport.Flag.Int("dirListLimit", 100000, "limit directory list size") dryRun = cmdFilerExport.Flag.Bool("dryRun", false, "not actually moving data") + verboseFilerExport = cmdFilerExport.Flag.Bool("v", false, "verbose entry details") ) type statistics struct { @@ -170,14 +171,16 @@ func printout(level int, entry *filer2.Entry) error { } } print(entry.FullPath.Name()) - for _, chunk:=range entry.Chunks{ - print("[") - print(chunk.FileId) - print(",") - print(chunk.Offset) - print(",") - print(chunk.Size) - print(")") + if *verboseFilerExport{ + for _, chunk := range entry.Chunks { + print("[") + print(chunk.FileId) + print(",") + print(chunk.Offset) + print(",") + print(chunk.Size) + print(")") + } } println() return nil |
