protected static List<Cluster> readClustersWritable(Path clustersIn) {
List<Cluster> clusters = Lists.newArrayList();
Configuration conf = new Configuration();
for (ClusterWritable value : new SequenceFileDirValueIterable<ClusterWritable>(clustersIn, PathType.LIST,
PathFilters.logsCRCFilter(), conf)) {
Cluster cluster = value.getValue();
log.info(
"Reading Cluster:{} center:{} numPoints:{} radius:{}",
cluster.getId(), AbstractCluster.formatVector(cluster.getCenter(), null),
cluster.getNumObservations(), AbstractCluster.formatVector(cluster.getRadius(), null));
clusters.add(cluster);
}
return clusters;
}