|
@@ -478,7 +478,9 @@ public class Mover {
|
|
|
List<StorageType> targetTypes, Matcher matcher) {
|
|
|
final NetworkTopology cluster = dispatcher.getCluster();
|
|
|
for (StorageType t : targetTypes) {
|
|
|
- for(StorageGroup target : storages.getTargetStorages(t)) {
|
|
|
+ final List<StorageGroup> targets = storages.getTargetStorages(t);
|
|
|
+ Collections.shuffle(targets);
|
|
|
+ for (StorageGroup target : targets) {
|
|
|
if (matcher.match(cluster, source.getDatanodeInfo(),
|
|
|
target.getDatanodeInfo())) {
|
|
|
final PendingMove pm = source.addPendingMove(db, target);
|