aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/topology_map.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/topology/topology_map.go')
-rw-r--r--weed/topology/topology_map.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/topology/topology_map.go b/weed/topology/topology_map.go
index 73c55d77d..eb8990ab2 100644
--- a/weed/topology/topology_map.go
+++ b/weed/topology/topology_map.go
@@ -5,6 +5,7 @@ import "github.com/chrislusf/seaweedfs/weed/pb/master_pb"
func (t *Topology) ToMap() interface{} {
m := make(map[string]interface{})
m["Max"] = t.GetMaxVolumeCount()
+ m["MaxSsd"] = t.GetMaxSsdVolumeCount()
m["Free"] = t.FreeSpace()
var dcs []interface{}
for _, c := range t.Children() {
@@ -30,6 +31,7 @@ func (t *Topology) ToMap() interface{} {
func (t *Topology) ToVolumeMap() interface{} {
m := make(map[string]interface{})
m["Max"] = t.GetMaxVolumeCount()
+ m["MaxSsd"] = t.GetMaxSsdVolumeCount()
m["Free"] = t.FreeSpace()
dcs := make(map[NodeId]interface{})
for _, c := range t.Children() {
@@ -83,9 +85,11 @@ func (t *Topology) ToTopologyInfo() *master_pb.TopologyInfo {
Id: string(t.Id()),
VolumeCount: uint64(t.GetVolumeCount()),
MaxVolumeCount: uint64(t.GetMaxVolumeCount()),
+ MaxSsdVolumeCount: uint64(t.GetMaxSsdVolumeCount()),
FreeVolumeCount: uint64(t.FreeSpace()),
ActiveVolumeCount: uint64(t.GetActiveVolumeCount()),
RemoteVolumeCount: uint64(t.GetRemoteVolumeCount()),
+ SsdVolumeCount: uint64(t.GetSsdVolumeCount()),
}
for _, c := range t.Children() {
dc := c.(*DataCenter)