diff options
| author | Lei Liu <lei01.liu@horizon.ai> | 2019-10-29 21:28:28 +0800 |
|---|---|---|
| committer | Lei Liu <lei01.liu@horizon.ai> | 2019-10-29 21:28:28 +0800 |
| commit | c2884cace2fae44dd97d718db30a22ab70151d63 (patch) | |
| tree | 100be0c642c7863baac2d7bae4c84fda62960925 /weed/server/master_server.go | |
| parent | eb2172f63fcdf7f5455c142daaceb6b1a489f7f4 (diff) | |
| download | seaweedfs-c2884cace2fae44dd97d718db30a22ab70151d63.tar.xz seaweedfs-c2884cace2fae44dd97d718db30a22ab70151d63.zip | |
misc updated
Signed-off-by: Lei Liu <lei01.liu@horizon.ai>
Diffstat (limited to 'weed/server/master_server.go')
| -rw-r--r-- | weed/server/master_server.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/weed/server/master_server.go b/weed/server/master_server.go index e9eb32cca..cde583560 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -3,9 +3,6 @@ package weed_server import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/shell" - "github.com/chrislusf/seaweedfs/weed/wdclient" - "google.golang.org/grpc" "net/http" "net/http/httputil" "net/url" @@ -21,10 +18,13 @@ import ( "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "github.com/chrislusf/seaweedfs/weed/security" "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/shell" "github.com/chrislusf/seaweedfs/weed/topology" "github.com/chrislusf/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/wdclient" "github.com/gorilla/mux" "github.com/spf13/viper" + "google.golang.org/grpc" ) type MasterOption struct { @@ -57,7 +57,7 @@ type MasterServer struct { clientChansLock sync.RWMutex clientChans map[string]chan *master_pb.VolumeLocation - grpcDialOpiton grpc.DialOption + grpcDialOption grpc.DialOption MasterClient *wdclient.MasterClient } @@ -83,7 +83,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []string) *Maste option: option, preallocateSize: preallocateSize, clientChans: make(map[string]chan *master_pb.VolumeLocation), - grpcDialOpiton: grpcDialOption, + grpcDialOption: grpcDialOption, MasterClient: wdclient.NewMasterClient(context.Background(), grpcDialOption, "master", peers), } ms.bounedLeaderChan = make(chan int, 16) @@ -112,7 +112,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []string) *Maste r.HandleFunc("/{fileId}", ms.redirectHandler) } - ms.Topo.StartRefreshWritableVolumes(ms.grpcDialOpiton, ms.option.GarbageThreshold, ms.preallocateSize) + ms.Topo.StartRefreshWritableVolumes(ms.grpcDialOption, ms.option.GarbageThreshold, ms.preallocateSize) ms.startAdminScripts() |
