aboutsummaryrefslogtreecommitdiff
path: root/go/topology/collection.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2014-03-10 11:43:54 -0700
committerChris Lu <chris.lu@gmail.com>2014-03-10 11:43:54 -0700
commitcd10c277b2146a7d01449dfe8825e7f1f12d7d7d (patch)
tree3f9bb75988e50aa2ddfc492fd45d27c6a748680f /go/topology/collection.go
parenta121453188f14ac3580bf61b47268bf029d61390 (diff)
downloadseaweedfs-cd10c277b2146a7d01449dfe8825e7f1f12d7d7d.tar.xz
seaweedfs-cd10c277b2146a7d01449dfe8825e7f1f12d7d7d.zip
can now delete a collection! Is this a dangerous feature? Only enabling
deleting "benchmark" collections for now.
Diffstat (limited to 'go/topology/collection.go')
-rw-r--r--go/topology/collection.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/go/topology/collection.go b/go/topology/collection.go
index 8042369a9..b21122d22 100644
--- a/go/topology/collection.go
+++ b/go/topology/collection.go
@@ -36,3 +36,14 @@ func (c *Collection) Lookup(vid storage.VolumeId) []*DataNode {
}
return nil
}
+
+func (c *Collection) ListVolumeServers() (nodes []*DataNode) {
+ for _, vl := range c.replicaType2VolumeLayout {
+ if vl != nil {
+ if list := vl.ListVolumeServers(); list != nil {
+ nodes = append(nodes, list...)
+ }
+ }
+ }
+ return
+}