aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/topology.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/topology/topology.go')
-rw-r--r--weed/topology/topology.go17
1 files changed, 3 insertions, 14 deletions
diff --git a/weed/topology/topology.go b/weed/topology/topology.go
index ffd32ae21..1c5633e95 100644
--- a/weed/topology/topology.go
+++ b/weed/topology/topology.go
@@ -2,7 +2,6 @@ package topology
import (
"errors"
- "io/ioutil"
"math/rand"
"github.com/chrislusf/raft"
@@ -30,7 +29,7 @@ type Topology struct {
RaftServer raft.Server
}
-func NewTopology(id string, confFile string, seq sequence.Sequencer, volumeSizeLimit uint64, pulse int) (*Topology, error) {
+func NewTopology(id string, seq sequence.Sequencer, volumeSizeLimit uint64, pulse int) *Topology {
t := &Topology{}
t.id = NodeId(id)
t.nodeType = "Topology"
@@ -44,9 +43,9 @@ func NewTopology(id string, confFile string, seq sequence.Sequencer, volumeSizeL
t.chanFullVolumes = make(chan storage.VolumeInfo)
- err := t.loadConfiguration(confFile)
+ t.Configuration = &Configuration{}
- return t, err
+ return t
}
func (t *Topology) IsLeader() bool {
@@ -72,16 +71,6 @@ func (t *Topology) Leader() (string, error) {
return l, nil
}
-func (t *Topology) loadConfiguration(configurationFile string) error {
- b, e := ioutil.ReadFile(configurationFile)
- if e == nil {
- t.Configuration, e = NewConfiguration(b)
- return e
- }
- glog.V(0).Infoln("Using default configurations.")
- return nil
-}
-
func (t *Topology) Lookup(collection string, vid storage.VolumeId) []*DataNode {
//maybe an issue if lots of collections?
if collection == "" {