RoutingStrategy strategy = new ConsistentRoutingStrategy(cluster, repFactor);
JsonTypeSerializer serializer = new JsonTypeSerializer(JsonTypeDefinition.INT32);
Map<Integer, Integer> counts = new HashMap<Integer, Integer>();
for(int i = 0; i < maxVal; i++) {
for(Node node: strategy.routeRequest(serializer.toBytes(i))) {
int newCount = 1;
if(counts.get(node.getId()) != null) {
newCount = counts.get(node.getId()) + 1;
}
counts.put(node.getId(), newCount);