ec shard info can be queried via VolumeList()

This commit is contained in:
Chris Lu
2019-05-22 22:44:28 -07:00
parent 17ac1290c0
commit 7180520889
6 changed files with 193 additions and 113 deletions

View File

@@ -0,0 +1,14 @@
package topology
import (
"github.com/chrislusf/seaweedfs/weed/storage/erasure_coding"
)
func (dn *DataNode) GetEcShards() (ret []erasure_coding.EcVolumeInfo) {
dn.RLock()
for _, ecVolumeInfo := range dn.ecShards {
ret = append(ret, ecVolumeInfo)
}
dn.RUnlock()
return ret
}