FileSystem fs = FileSystem.get(conf);
SequenceFile.Reader reader = new SequenceFile.Reader(fs, new Path(clusteredPointsPath, "part-m-00000"), conf);
// The key is the clusterId
IntWritable clusterId = new IntWritable(0);
// The value is the weighted vector
WeightedVectorWritable value = new WeightedVectorWritable();
int id = 0;
while (reader.next(clusterId, value)) {
log.info("{}: {}", id++, clusterId.get());
clusterId = new IntWritable(0);
value = new WeightedVectorWritable();
}
reader.close();
// TODO: output format???
}