Skip to content

Commit

Permalink
Change variable name in RouteToAllStrategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjwylie committed Jun 20, 2013
1 parent 89969de commit e876dd1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/java/voldemort/routing/RouteToAllStrategy.java
Expand Up @@ -36,12 +36,13 @@ public class RouteToAllStrategy implements RoutingStrategy {
final private Collection<Node> nodes;
final private ArrayList<Integer> partitionIds;

final private int imaginaryPartitionId = 0;
// Use partition ID 0 for all keys to implement route to all strategy.
final static private int ROUTE_TO_ALL_PARTITION_ID = 0;

public RouteToAllStrategy(Collection<Node> nodes) {
this.nodes = nodes;
this.partitionIds = new ArrayList<Integer>(1);
this.partitionIds.add(imaginaryPartitionId);
this.partitionIds.add(ROUTE_TO_ALL_PARTITION_ID);
}

@Override
Expand Down Expand Up @@ -77,7 +78,7 @@ public List<Integer> getReplicatingPartitionList(int partitionId) {
*/
@Override
public Integer getMasterPartition(byte[] key) {
return imaginaryPartitionId;
return ROUTE_TO_ALL_PARTITION_ID;
}

@Override
Expand Down

0 comments on commit e876dd1

Please sign in to comment.