diff options
Diffstat (limited to 'go/topology/topology.go')
| -rw-r--r-- | go/topology/topology.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/go/topology/topology.go b/go/topology/topology.go index ee1477cd2..088639eef 100644 --- a/go/topology/topology.go +++ b/go/topology/topology.go @@ -90,13 +90,13 @@ func (t *Topology) loadConfiguration(configurationFile string) error { func (t *Topology) Lookup(collection string, vid storage.VolumeId) []*DataNode { //maybe an issue if lots of collections? if collection == "" { - for _, c := range t.collectionMap.Items { + for _, c := range t.collectionMap.Items() { if list := c.(*Collection).Lookup(vid); list != nil { return list } } } else { - if c, ok := t.collectionMap.Items[collection]; ok { + if c, ok := t.collectionMap.Find(collection); ok { return c.(*Collection).Lookup(vid) } } @@ -130,13 +130,13 @@ func (t *Topology) GetVolumeLayout(collectionName string, rp *storage.ReplicaPla }).(*Collection).GetOrCreateVolumeLayout(rp, ttl) } -func (t *Topology) GetCollection(collectionName string) (*Collection, bool) { - c, hasCollection := t.collectionMap.Items[collectionName] +func (t *Topology) FindCollection(collectionName string) (*Collection, bool) { + c, hasCollection := t.collectionMap.Find(collectionName) return c.(*Collection), hasCollection } func (t *Topology) DeleteCollection(collectionName string) { - delete(t.collectionMap.Items, collectionName) + t.collectionMap.Delete(collectionName) } func (t *Topology) RegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) { |
