diff --git a/src/java/voldemort/utils/ClusterForkLiftTool.java b/src/java/voldemort/utils/ClusterForkLiftTool.java index 67a7e42538..5f98e36aae 100644 --- a/src/java/voldemort/utils/ClusterForkLiftTool.java +++ b/src/java/voldemort/utils/ClusterForkLiftTool.java @@ -1,6 +1,7 @@ package voldemort.utils; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -160,6 +161,9 @@ public ClusterForkLiftTool(String srcBootstrapUrl, .getNumberOfPartitions()); for(Node node: srcAdminClient.getAdminClientCluster().getNodes()) this.partitionList.addAll(node.getPartitionIds()); + // shuffle the partition list so the fetching will equally spread + // across the source cluster + Collections.shuffle(this.partitionList); if(this.partitionList.size() > srcAdminClient.getAdminClientCluster() .getNumberOfPartitions()) { throw new VoldemortException("Incorrect partition mapping in source cluster"); @@ -557,7 +561,7 @@ public static void main(String[] args) throws Exception { maxPutsPerSecond = (Integer) options.valueOf("max-puts-per-second"); List storesList = null; if(options.has("stores")) { - storesList = (List) options.valuesOf("stores"); + storesList = new ArrayList((List) options.valuesOf("stores")); } List partitions = null; if(options.has("partitions")) {