Skip to content

Commit

Permalink
Dropping RebalanceNodePlan, the class that sorted lists of RebalanceP…
Browse files Browse the repository at this point in the history
…artitionsInfo by node id (either stealer or donor node), and then flattened the sorted list out and returned it again. AKA the identity operation on a list of RebalancePartitionsInfo.
  • Loading branch information
jayjwylie committed Jun 20, 2013
1 parent 42d3868 commit 2b69609
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 60 deletions.
43 changes: 0 additions & 43 deletions src/java/voldemort/client/rebalance/RebalanceNodePlan.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/java/voldemort/utils/RebalanceUtils.java
Expand Up @@ -42,7 +42,6 @@
import voldemort.client.ClientConfig;
import voldemort.client.protocol.admin.AdminClient;
import voldemort.client.protocol.admin.AdminClientConfig;
import voldemort.client.rebalance.RebalanceNodePlan;
import voldemort.client.rebalance.RebalancePartitionsInfo;
import voldemort.cluster.Cluster;
import voldemort.cluster.Node;
Expand Down Expand Up @@ -1054,22 +1053,6 @@ public static Set<Pair<Integer, Integer>> flattenPartitionTuples(HashMap<Integer
return partitionTuples;
}

/**
* Given a list of node plans flattens it into a list of partitions info
*
* @param rebalanceNodePlanList Complete list of rebalance node plan
* @return Flattened list of partition plans
*/
public static List<RebalancePartitionsInfo> flattenNodePlans(List<RebalanceNodePlan> rebalanceNodePlanList) {
List<RebalancePartitionsInfo> list = new ArrayList<RebalancePartitionsInfo>();
for(RebalanceNodePlan rebalanceNodePlan: rebalanceNodePlanList) {
for(final RebalancePartitionsInfo stealInfo: rebalanceNodePlan.getRebalanceTaskList()) {
list.add(stealInfo);
}
}
return list;
}

/**
* Given a set of [ replica, partition ] tuples, flatten it to retrieve only
* the partitions
Expand Down

0 comments on commit 2b69609

Please sign in to comment.