diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-07-07 23:06:48 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-07-07 23:06:48 -0700 |
| commit | a2eb680f3495f256fc184797b299a285bab68e0f (patch) | |
| tree | ee274038d86a455a8a128b639b2c74f8edf7f893 /weed/command/filer.go | |
| parent | 3c269da37f072c58f3f918cb7b937c54635f34e9 (diff) | |
| download | seaweedfs-a2eb680f3495f256fc184797b299a285bab68e0f.tar.xz seaweedfs-a2eb680f3495f256fc184797b299a285bab68e0f.zip | |
filer: default filer store directory
1. set default filer store directory
2. set peers, avoiding empty string counted as 1.
Diffstat (limited to 'weed/command/filer.go')
| -rw-r--r-- | weed/command/filer.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/weed/command/filer.go b/weed/command/filer.go index c18925006..b52b01149 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -103,6 +103,11 @@ func (fo *FilerOptions) startFiler() { defaultLevelDbDirectory = *fo.defaultLevelDbDirectory + "/filerldb2" } + var peers []string + if *fo.peers != "" { + peers = strings.Split(*fo.peers, ",") + } + fs, nfs_err := weed_server.NewFilerServer(defaultMux, publicVolumeMux, &weed_server.FilerOption{ Masters: strings.Split(*fo.masters, ","), Collection: *fo.collection, @@ -116,7 +121,7 @@ func (fo *FilerOptions) startFiler() { Host: *fo.ip, Port: uint32(*fo.port), Cipher: *fo.cipher, - Filers: strings.Split(*fo.peers, ","), + Filers: peers, }) if nfs_err != nil { glog.Fatalf("Filer startup error: %v", nfs_err) |
