aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-07-02 09:28:24 -0700
committerchrislu <chris.lu@gmail.com>2022-07-28 23:22:07 -0700
commit8d31e73ffd7d33d79c1ce125e1df2f9464ccbe09 (patch)
tree2dad16096aa4d01b3e85f40b48b80b588edada9d /weed/command
parent87ccef72db028a0a07ca359bd2b4d39d1e622b93 (diff)
downloadseaweedfs-8d31e73ffd7d33d79c1ce125e1df2f9464ccbe09.tar.xz
seaweedfs-8d31e73ffd7d33d79c1ce125e1df2f9464ccbe09.zip
mq broker adds data center and rack
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/mq_broker.go4
-rw-r--r--weed/command/server.go2
2 files changed, 6 insertions, 0 deletions
diff --git a/weed/command/mq_broker.go b/weed/command/mq_broker.go
index c87cccd2c..a80e3da70 100644
--- a/weed/command/mq_broker.go
+++ b/weed/command/mq_broker.go
@@ -28,6 +28,8 @@ type MessageQueueBrokerOptions struct {
filer *string
ip *string
port *int
+ dataCenter *string
+ rack *string
cpuprofile *string
memprofile *string
}
@@ -39,6 +41,8 @@ func init() {
mqBrokerStandaloneOptions.filerGroup = cmdMqBroker.Flag.String("filerGroup", "", "share metadata with other filers in the same filerGroup")
mqBrokerStandaloneOptions.ip = cmdMqBroker.Flag.String("ip", util.DetectedHostAddress(), "broker host address")
mqBrokerStandaloneOptions.port = cmdMqBroker.Flag.Int("port", 17777, "broker gRPC listen port")
+ mqBrokerStandaloneOptions.dataCenter = cmdMqBroker.Flag.String("dataCenter", "", "prefer to read and write to volumes in this data center")
+ mqBrokerStandaloneOptions.rack = cmdMqBroker.Flag.String("rack", "", "prefer to write to volumes in this rack")
mqBrokerStandaloneOptions.cpuprofile = cmdMqBroker.Flag.String("cpuprofile", "", "cpu profile output file")
mqBrokerStandaloneOptions.memprofile = cmdMqBroker.Flag.String("memprofile", "", "memory profile output file")
}
diff --git a/weed/command/server.go b/weed/command/server.go
index 2c363087c..9e1cea07d 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -217,6 +217,8 @@ func runServer(cmd *Command, args []string) bool {
filerOptions.dataCenter = serverDataCenter
filerOptions.rack = serverRack
+ mqBrokerOptions.dataCenter = serverDataCenter
+ mqBrokerOptions.rack = serverRack
filerOptions.disableHttp = serverDisableHttp
masterOptions.disableHttp = serverDisableHttp