filer: support cross filer meta data sync if sharing the same store

This commit is contained in:
Chris Lu
2020-07-06 09:24:54 -07:00
parent 0b8cc9b626
commit d198e8c6d6
4 changed files with 18 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ type FilerOptions struct {
enableNotification *bool
disableHttp *bool
cipher *bool
peers *string
// default leveldb directory, used in "weed server" mode
defaultLevelDbDirectory *string
@@ -55,6 +56,7 @@ func init() {
f.dataCenter = cmdFiler.Flag.String("dataCenter", "", "prefer to write to volumes in this data center")
f.disableHttp = cmdFiler.Flag.Bool("disableHttp", false, "disable http request, only gRpc operations are allowed")
f.cipher = cmdFiler.Flag.Bool("encryptVolumeData", false, "encrypt data on volume servers")
f.peers = cmdFiler.Flag.String("peers", "", "all filers sharing the same filer store in comma separated ip:port list")
}
var cmdFiler = &Command{
@@ -114,6 +116,7 @@ func (fo *FilerOptions) startFiler() {
Host: *fo.ip,
Port: uint32(*fo.port),
Cipher: *fo.cipher,
Filers: strings.Split(*fo.peers, ","),
})
if nfs_err != nil {
glog.Fatalf("Filer startup error: %v", nfs_err)

View File

@@ -88,6 +88,7 @@ func init() {
filerOptions.maxMB = cmdServer.Flag.Int("filer.maxMB", 32, "split files larger than the limit")
filerOptions.dirListingLimit = cmdServer.Flag.Int("filer.dirListLimit", 1000, "limit sub dir listing size")
filerOptions.cipher = cmdServer.Flag.Bool("filer.encryptVolumeData", false, "encrypt data on volume servers")
filerOptions.peers = cmdServer.Flag.String("filer.peers", "", "all filers sharing the same filer store in comma separated ip:port list")
serverOptions.v.port = cmdServer.Flag.Int("volume.port", 8080, "volume server http listen port")
serverOptions.v.publicPort = cmdServer.Flag.Int("volume.port.public", 0, "volume server public port")