// we'll need the ClusterSpec to get the nodes
ClusterSpec clusterSpec = provider.getSpec();
assertNotNull(clusterSpec, "cluster spec must not be null");
RunningAverage avg = new RunningAverage();
int nodeCnt = clusterSpec.getNodeSpecs().size();
Number[] data = new Number[nodeCnt];
int i = 0;
for(ClusterNodeSpec n : clusterSpec.getNodeSpecs()){
Long cnt = distribution.get(n);
avg.onMeasure(cnt);
data[i++] = cnt;
}
assertTrue(avg.getMin() > 0, "No node should have zero keys assigned to it");
assertTrue(avg.getMax() > 0, "No node should have zero keys assigned to it");
Log.log("Distributed %d keys in a %d node cluster:\n\t Key/node distribution -- AVG: %d - MIN: %d - MAX: %d\n", keycnt, nodeCnt, avg.get(), avg.getMin(), avg.getMax());
}