diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-06-30 11:01:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-30 11:01:40 -0700 |
| commit | 4a0ba3a1a9267ca4b1f1faf4054266bb745b1fa3 (patch) | |
| tree | 27e7de62719f13b8e943ae2280d24c2be2f83f8a /weed/command/volume.go | |
| parent | e9eb15e56ae1a6df23df38e195c3d702e6f48e03 (diff) | |
| parent | 20d33ae0252d73a1baa11758cea737227e73db56 (diff) | |
| download | seaweedfs-4a0ba3a1a9267ca4b1f1faf4054266bb745b1fa3.tar.xz seaweedfs-4a0ba3a1a9267ca4b1f1faf4054266bb745b1fa3.zip | |
Merge pull request #2168 from song-zhang/master
add proxy mode to read non-local volumes
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go index 139a3791e..fe75e9e91 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -51,7 +51,7 @@ type VolumeServerOptions struct { indexType *string diskType *string fixJpgOrientation *bool - readRedirect *bool + readMode *string cpuProfile *string memProfile *string compactionMBPerSecond *int @@ -80,7 +80,7 @@ func init() { v.indexType = cmdVolume.Flag.String("index", "memory", "Choose [memory|leveldb|leveldbMedium|leveldbLarge] mode for memory~performance balance.") v.diskType = cmdVolume.Flag.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag") v.fixJpgOrientation = cmdVolume.Flag.Bool("images.fix.orientation", false, "Adjust jpg orientation when uploading.") - v.readRedirect = cmdVolume.Flag.Bool("read.redirect", true, "Redirect moved or non-local volumes.") + v.readMode = cmdVolume.Flag.String("readMode", "redirect", "[local|proxy|redirect] how to deal with non-local volume: 'not found|proxy to remote node|redirect volume location'.") v.cpuProfile = cmdVolume.Flag.String("cpuprofile", "", "cpu profile output file") v.memProfile = cmdVolume.Flag.String("memprofile", "", "memory profile output file") v.compactionMBPerSecond = cmdVolume.Flag.Int("compactionMBps", 0, "limit background compaction or copying speed in mega bytes per second") @@ -228,7 +228,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v volumeNeedleMapKind, strings.Split(masters, ","), 5, *v.dataCenter, *v.rack, v.whiteList, - *v.fixJpgOrientation, *v.readRedirect, + *v.fixJpgOrientation, *v.readMode, *v.compactionMBPerSecond, *v.fileSizeLimitMB, int64(*v.concurrentUploadLimitMB)*1024*1024, |
