Skip to content

Commit

Permalink
Check that zone value for a node is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
voldemort committed Jun 6, 2013
1 parent 1dc6872 commit 96ff6d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/java/voldemort/cluster/Cluster.java
Expand Up @@ -88,6 +88,9 @@ public Cluster(String name, List<Node> nodes, List<Zone> zones) {
nodesById.put(node.getId(), node);

Zone nodesZone = zonesById.get(node.getZoneId());
if (nodesZone == null) {
throw new IllegalArgumentException("No zone associated with this node exists.");
}
nodesPerZone.get(nodesZone).add(node.getId());
partitionsPerZone.get(nodesZone).addAll(node.getPartitionIds());
}
Expand Down

0 comments on commit 96ff6d9

Please sign in to comment.