aboutsummaryrefslogtreecommitdiff
path: root/go/weed/volume.go
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2015-08-03 14:43:15 -0700
committerchrislusf <chris.lu@gmail.com>2015-08-03 14:43:15 -0700
commit7d1e9a6b8a45852881c872f1f752bcaa78520639 (patch)
treefa08294e5291bcdb30fecdab619a7da4b577820c /go/weed/volume.go
parent320e946d5019b568c5877125681363d580a8593b (diff)
downloadseaweedfs-7d1e9a6b8a45852881c872f1f752bcaa78520639.tar.xz
seaweedfs-7d1e9a6b8a45852881c872f1f752bcaa78520639.zip
add option to redirect moved or non-local volumes
fix https://github.com/chrislusf/seaweedfs/issues/168
Diffstat (limited to 'go/weed/volume.go')
-rw-r--r--go/weed/volume.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/go/weed/volume.go b/go/weed/volume.go
index d44a75d36..f1b12dae8 100644
--- a/go/weed/volume.go
+++ b/go/weed/volume.go
@@ -35,6 +35,7 @@ type VolumeServerOptions struct {
whiteList []string
indexType *string
fixJpgOrientation *bool
+ readRedirect *bool
}
func init() {
@@ -52,6 +53,7 @@ func init() {
v.rack = cmdVolume.Flag.String("rack", "", "current volume server's rack name")
v.indexType = cmdVolume.Flag.String("index", "memory", "Choose [memory|leveldb|boltdb] mode for memory~performance balance.")
v.fixJpgOrientation = cmdVolume.Flag.Bool("images.fix.orientation", true, "Adjust jpg orientation when uploading.")
+ v.readRedirect = cmdVolume.Flag.Bool("read.redirect", true, "Redirect moved or non-local volumes.")
}
var cmdVolume = &Command{
@@ -129,7 +131,7 @@ func runVolume(cmd *Command, args []string) bool {
volumeNeedleMapKind,
*v.master, *v.pulseSeconds, *v.dataCenter, *v.rack,
v.whiteList,
- *v.fixJpgOrientation,
+ *v.fixJpgOrientation, *v.readRedirect,
)
listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port)