diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-08-05 05:35:00 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-04 17:35:00 -0700 |
| commit | 4d08393b7ca8b1a34ed65532955de76cf8843ec2 (patch) | |
| tree | b764fe5f4b927d9b9cf1b83a2f19c87a91d81c8e /weed/shell/commands.go | |
| parent | 28a1f42962a3c22fa341d62e52ed014ae17c508f (diff) | |
| download | seaweedfs-4d08393b7ca8b1a34ed65532955de76cf8843ec2.tar.xz seaweedfs-4d08393b7ca8b1a34ed65532955de76cf8843ec2.zip | |
filer prefer volume server in same data center (#3405)
* initial prefer same data center
https://github.com/seaweedfs/seaweedfs/issues/3404
* GetDataCenter
* prefer same data center for ReplicationSource
* GetDataCenterId
* remove glog
Diffstat (limited to 'weed/shell/commands.go')
| -rw-r--r-- | weed/shell/commands.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/shell/commands.go b/weed/shell/commands.go index 378c89b25..e3de42aa9 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -108,6 +108,10 @@ func (ce *CommandEnv) AdjustedUrl(location *filer_pb.Location) string { return location.Url } +func (ce *CommandEnv) GetDataCenter() string { + return ce.MasterClient.DataCenter +} + func parseFilerUrl(entryPath string) (filerServer string, filerPort int64, path string, err error) { if strings.HasPrefix(entryPath, "http") { var u *url.URL |
