mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
master: put metadata under instance specific folder
This commit is contained in:
parent
41dfe27102
commit
492da3dbce
|
@ -1,9 +1,11 @@
|
||||||
package command
|
package command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"golang.org/x/exp/slices"
|
"golang.org/x/exp/slices"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -151,11 +153,12 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// start raftServer
|
// start raftServer
|
||||||
|
metaDir := path.Join(*masterOption.metaFolder, fmt.Sprintf("m%d", *masterOption.port))
|
||||||
raftServerOption := &weed_server.RaftServerOption{
|
raftServerOption := &weed_server.RaftServerOption{
|
||||||
GrpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.master"),
|
GrpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.master"),
|
||||||
Peers: masterPeers,
|
Peers: masterPeers,
|
||||||
ServerAddr: myMasterAddress,
|
ServerAddr: myMasterAddress,
|
||||||
DataDir: util.ResolvePath(*masterOption.metaFolder),
|
DataDir: util.ResolvePath(metaDir),
|
||||||
Topo: ms.Topo,
|
Topo: ms.Topo,
|
||||||
RaftResumeState: *masterOption.raftResumeState,
|
RaftResumeState: *masterOption.raftResumeState,
|
||||||
HeartbeatInterval: *masterOption.heartbeatInterval,
|
HeartbeatInterval: *masterOption.heartbeatInterval,
|
||||||
|
|
Loading…
Reference in a new issue