diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-04-18 21:43:36 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-04-18 21:43:36 -0700 |
| commit | e5506152c0a27d38fa334b2e338d82ee02669ab9 (patch) | |
| tree | 1f589cbbf7244cbe5dbfe84ca89f5996e4ca9ff3 /weed/topology/collection.go | |
| parent | 33c92b819a334b5709e6f1cbe304e4b8855c1238 (diff) | |
| download | seaweedfs-e5506152c0a27d38fa334b2e338d82ee02669ab9.tar.xz seaweedfs-e5506152c0a27d38fa334b2e338d82ee02669ab9.zip | |
refactoring
Diffstat (limited to 'weed/topology/collection.go')
| -rw-r--r-- | weed/topology/collection.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/topology/collection.go b/weed/topology/collection.go index a17f0c961..f6b728ec9 100644 --- a/weed/topology/collection.go +++ b/weed/topology/collection.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "github.com/chrislusf/seaweedfs/weed/util" ) @@ -23,7 +24,7 @@ func (c *Collection) String() string { return fmt.Sprintf("Name:%s, volumeSizeLimit:%d, storageType2VolumeLayout:%v", c.Name, c.volumeSizeLimit, c.storageType2VolumeLayout) } -func (c *Collection) GetOrCreateVolumeLayout(rp *storage.ReplicaPlacement, ttl *storage.TTL) *VolumeLayout { +func (c *Collection) GetOrCreateVolumeLayout(rp *storage.ReplicaPlacement, ttl *needle.TTL) *VolumeLayout { keyString := rp.String() if ttl != nil { keyString += ttl.String() @@ -34,7 +35,7 @@ func (c *Collection) GetOrCreateVolumeLayout(rp *storage.ReplicaPlacement, ttl * return vl.(*VolumeLayout) } -func (c *Collection) Lookup(vid storage.VolumeId) []*DataNode { +func (c *Collection) Lookup(vid needle.VolumeId) []*DataNode { for _, vl := range c.storageType2VolumeLayout.Items() { if vl != nil { if list := vl.(*VolumeLayout).Lookup(vid); list != nil { |
