|
@ -63,9 +63,7 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv, |
|
|
replicatedVolumeLocations := make(map[uint32][]location) |
|
|
replicatedVolumeLocations := make(map[uint32][]location) |
|
|
replicatedVolumeInfo := make(map[uint32]*master_pb.VolumeInformationMessage) |
|
|
replicatedVolumeInfo := make(map[uint32]*master_pb.VolumeInformationMessage) |
|
|
var allLocations []location |
|
|
var allLocations []location |
|
|
for _, dc := range resp.TopologyInfo.DataCenterInfos { |
|
|
|
|
|
for _, rack := range dc.RackInfos { |
|
|
|
|
|
for _, dn := range rack.DataNodeInfos { |
|
|
|
|
|
|
|
|
eachDataNode(resp.TopologyInfo, func(dc string, rack RackId, dn *master_pb.DataNodeInfo) { |
|
|
loc := newLocation(dc.Id, rack.Id, dn) |
|
|
loc := newLocation(dc.Id, rack.Id, dn) |
|
|
for _, v := range dn.VolumeInfos { |
|
|
for _, v := range dn.VolumeInfos { |
|
|
if v.ReplicaPlacement > 0 { |
|
|
if v.ReplicaPlacement > 0 { |
|
@ -74,9 +72,7 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
allLocations = append(allLocations, loc) |
|
|
allLocations = append(allLocations, loc) |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// find all under replicated volumes
|
|
|
// find all under replicated volumes
|
|
|
underReplicatedVolumeLocations := make(map[uint32][]location) |
|
|
underReplicatedVolumeLocations := make(map[uint32][]location) |
|
|