diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-09-17 00:42:36 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-09-17 00:42:36 -0700 |
| commit | b7a375f5aab78ef9a04c456ad0c46d9a5652eb88 (patch) | |
| tree | f6e1252a290a946ca75fb2d2f7992b744a58d507 | |
| parent | 4e1f1a0b92fe531c72db784c2f089b8d1b1e6c1e (diff) | |
| download | seaweedfs-b7a375f5aab78ef9a04c456ad0c46d9a5652eb88.tar.xz seaweedfs-b7a375f5aab78ef9a04c456ad0c46d9a5652eb88.zip | |
set large limit for "weed filer.export" directory listing
| -rw-r--r-- | weed/command/filer_export.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/command/filer_export.go b/weed/command/filer_export.go index d57acedc3..9bd0f3014 100644 --- a/weed/command/filer_export.go +++ b/weed/command/filer_export.go @@ -29,6 +29,7 @@ var ( // filerExportOutputFile = cmdFilerExport.Flag.String("output", "", "the output file. If empty, only list out the directory tree") filerExportSourceStore = cmdFilerExport.Flag.String("sourceStore", "", "the source store name in filer.toml") filerExportTargetStore = cmdFilerExport.Flag.String("targetStore", "", "the target store name in filer.toml") + dirListLimit = cmdFilerExport.Flag.Int("dirListLimit", 100000, "limit directory list size") ) type statistics struct { @@ -99,7 +100,7 @@ func runFilerExport(cmd *Command, args []string) bool { func doTraverse(stat *statistics, filerStore filer2.FilerStore, parentPath filer2.FullPath, level int, fn func(level int, entry *filer2.Entry) error) { - limit := 1000 + limit := *dirListLimit lastEntryName := "" for { entries, err := filerStore.ListDirectoryEntries(parentPath, lastEntryName, false, limit) |
