aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filer.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-05-01 21:59:16 -0700
committerchrislu <chris.lu@gmail.com>2022-05-01 21:59:16 -0700
commit94635e9b5c81d6afa1b54f20f5d2d2595bba2322 (patch)
tree9e6eb799c480603598b020e4f6cdddaa21f555af /weed/filer/filer.go
parent4bd6bea4295cd238278b20f18a15664fa3465008 (diff)
downloadseaweedfs-94635e9b5c81d6afa1b54f20f5d2d2595bba2322.tar.xz
seaweedfs-94635e9b5c81d6afa1b54f20f5d2d2595bba2322.zip
filer: add filer group
Diffstat (limited to 'weed/filer/filer.go')
-rw-r--r--weed/filer/filer.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/weed/filer/filer.go b/weed/filer/filer.go
index 836a0e447..59cbf4d75 100644
--- a/weed/filer/filer.go
+++ b/weed/filer/filer.go
@@ -49,10 +49,10 @@ type Filer struct {
UniqueFileId uint32
}
-func NewFiler(masters map[string]pb.ServerAddress, grpcDialOption grpc.DialOption,
- filerHost pb.ServerAddress, collection string, replication string, dataCenter string, notifyFn func()) *Filer {
+func NewFiler(masters map[string]pb.ServerAddress, grpcDialOption grpc.DialOption, filerHost pb.ServerAddress,
+ filerGroup string, collection string, replication string, dataCenter string, notifyFn func()) *Filer {
f := &Filer{
- MasterClient: wdclient.NewMasterClient(grpcDialOption, cluster.FilerType, filerHost, dataCenter, masters),
+ MasterClient: wdclient.NewMasterClient(grpcDialOption, filerGroup, cluster.FilerType, filerHost, dataCenter, masters),
fileIdDeletionQueue: util.NewUnboundedQueue(),
GrpcDialOption: grpcDialOption,
FilerConf: NewFilerConf(),
@@ -84,6 +84,7 @@ func (f *Filer) ListExistingPeerUpdates() (existingNodes []*master_pb.ClusterNod
if grpcErr := pb.WithMasterClient(false, f.MasterClient.GetMaster(), f.GrpcDialOption, func(client master_pb.SeaweedClient) error {
resp, err := client.ListClusterNodes(context.Background(), &master_pb.ListClusterNodesRequest{
ClientType: cluster.FilerType,
+ FilerGroup: f.MasterClient.FilerGroup,
})
glog.V(0).Infof("the cluster has %d filers\n", len(resp.ClusterNodes))