diff options
| author | Chris Lu <chris.lu@gmail.com> | 2017-01-08 14:57:32 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2017-01-08 14:57:32 -0800 |
| commit | 53cf1b4900630883ef38a95324cda29f50e75b8d (patch) | |
| tree | c39b7b0112b2c31142ccecd206bc3a60ba709aa9 /weed | |
| parent | ed44f12f6db7f05aba8a76f1a0ff92356c43d4b0 (diff) | |
| download | seaweedfs-53cf1b4900630883ef38a95324cda29f50e75b8d.tar.xz seaweedfs-53cf1b4900630883ef38a95324cda29f50e75b8d.zip | |
change the basic unit to MB
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/command/compact.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/compact.go b/weed/command/compact.go index ae54db115..5c3038c78 100644 --- a/weed/command/compact.go +++ b/weed/command/compact.go @@ -24,7 +24,7 @@ var ( compactVolumeCollection = cmdCompact.Flag.String("collection", "", "volume collection name") compactVolumeId = cmdCompact.Flag.Int("volumeId", -1, "a volume id. The volume should already exist in the dir.") compactMethod = cmdCompact.Flag.Int("method", 0, "option to choose which compact method. use 0 or 1.") - compactVolumePreallocate = cmdCompact.Flag.Int64("preallocate", 0, "preallocate volume disk space") + compactVolumePreallocate = cmdCompact.Flag.Int64("preallocateMB", 0, "preallocate volume disk space") ) func runCompact(cmd *Command, args []string) bool { @@ -35,7 +35,7 @@ func runCompact(cmd *Command, args []string) bool { vid := storage.VolumeId(*compactVolumeId) v, err := storage.NewVolume(*compactVolumePath, *compactVolumeCollection, vid, - storage.NeedleMapInMemory, nil, nil, *compactVolumePreallocate) + storage.NeedleMapInMemory, nil, nil, *compactVolumePreallocate*(1<<20)) if err != nil { glog.Fatalf("Load Volume [ERROR] %s\n", err) } |
