diff options
| author | chrislu <chris.lu@gmail.com> | 2022-05-01 21:59:16 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-05-01 21:59:16 -0700 |
| commit | 94635e9b5c81d6afa1b54f20f5d2d2595bba2322 (patch) | |
| tree | 9e6eb799c480603598b020e4f6cdddaa21f555af /weed/command | |
| parent | 4bd6bea4295cd238278b20f18a15664fa3465008 (diff) | |
| download | seaweedfs-94635e9b5c81d6afa1b54f20f5d2d2595bba2322.tar.xz seaweedfs-94635e9b5c81d6afa1b54f20f5d2d2595bba2322.zip | |
filer: add filer group
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/benchmark.go | 2 | ||||
| -rw-r--r-- | weed/command/filer.go | 3 | ||||
| -rw-r--r-- | weed/command/server.go | 1 | ||||
| -rw-r--r-- | weed/command/shell.go | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go index 7091463cc..82821f579 100644 --- a/weed/command/benchmark.go +++ b/weed/command/benchmark.go @@ -129,7 +129,7 @@ func runBenchmark(cmd *Command, args []string) bool { defer pprof.StopCPUProfile() } - b.masterClient = wdclient.NewMasterClient(b.grpcDialOption, "client", "", "", pb.ServerAddresses(*b.masters).ToAddressMap()) + b.masterClient = wdclient.NewMasterClient(b.grpcDialOption, "", "client", "", "", pb.ServerAddresses(*b.masters).ToAddressMap()) go b.masterClient.KeepConnectedToMaster() b.masterClient.WaitUntilConnected() diff --git a/weed/command/filer.go b/weed/command/filer.go index 4dbc04a0c..0935feb76 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -37,6 +37,7 @@ type FilerOptions struct { port *int portGrpc *int publicPort *int + filerGroup *string collection *string defaultReplicaPlacement *string disableDirListing *bool @@ -59,6 +60,7 @@ type FilerOptions struct { func init() { cmdFiler.Run = runFiler // break init cycle f.mastersString = cmdFiler.Flag.String("master", "localhost:9333", "comma-separated master servers") + f.filerGroup = cmdFiler.Flag.String("filerGroup", "", "share metadata with other filers in the same filerGroup") f.collection = cmdFiler.Flag.String("collection", "", "all data will be stored in this default collection") f.ip = cmdFiler.Flag.String("ip", util.DetectedHostAddress(), "filer server http listen ip address") f.bindIp = cmdFiler.Flag.String("ip.bind", "", "ip address to bind to. If empty, default to same as -ip option.") @@ -201,6 +203,7 @@ func (fo *FilerOptions) startFiler() { fs, nfs_err := weed_server.NewFilerServer(defaultMux, publicVolumeMux, &weed_server.FilerOption{ Masters: fo.masters, + FilerGroup: *fo.filerGroup, Collection: *fo.collection, DefaultReplication: *fo.defaultReplicaPlacement, DisableDirListing: *fo.disableDirListing, diff --git a/weed/command/server.go b/weed/command/server.go index e3aec67d1..d26376c1a 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -101,6 +101,7 @@ func init() { masterOptions.heartbeatInterval = cmdServer.Flag.Duration("master.heartbeatInterval", 300*time.Millisecond, "heartbeat interval of master servers, and will be randomly multiplied by [1, 1.25)") masterOptions.electionTimeout = cmdServer.Flag.Duration("master.electionTimeout", 10*time.Second, "election timeout of master servers") + filerOptions.filerGroup = cmdServer.Flag.String("filer.filerGroup", "", "share metadata with other filers in the same filerGroup") filerOptions.collection = cmdServer.Flag.String("filer.collection", "", "all data will be stored in this collection") filerOptions.port = cmdServer.Flag.Int("filer.port", 8888, "filer server http listen port") filerOptions.portGrpc = cmdServer.Flag.Int("filer.port.grpc", 0, "filer server grpc listen port") diff --git a/weed/command/shell.go b/weed/command/shell.go index 3ba51aec1..c32a8e614 100644 --- a/weed/command/shell.go +++ b/weed/command/shell.go @@ -18,6 +18,7 @@ var ( func init() { cmdShell.Run = runShell // break init cycle shellOptions.Masters = cmdShell.Flag.String("master", "", "comma-separated master servers, e.g. localhost:9333") + shellOptions.FilerGroup = cmdShell.Flag.String("filerGroup", "", "filerGroup for the filers") shellInitialFiler = cmdShell.Flag.String("filer", "", "filer host and port, e.g. localhost:8888") shellCluster = cmdShell.Flag.String("cluster", "", "cluster defined in shell.toml") } |
