private static void clusterDataSeq(Path input, Path clustersIn, Path output) throws IOException, InstantiationException,
IllegalAccessException {
Collection<MeanShiftCanopy> clusters = new ArrayList<MeanShiftCanopy>();
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(clustersIn.toUri(), conf);
FileStatus[] status = fs.listStatus(clustersIn, new OutputLogFilter());
for (FileStatus s : status) {
SequenceFile.Reader reader = new SequenceFile.Reader(fs, s.getPath(), conf);
try {
Writable key = reader.getKeyClass().asSubclass(Writable.class).newInstance();
MeanShiftCanopy value = reader.getValueClass().asSubclass(MeanShiftCanopy.class).newInstance();
while (reader.next(key, value)) {
clusters.add(value);
value = reader.getValueClass().asSubclass(MeanShiftCanopy.class).newInstance();
}
} finally {
reader.close();
}
}
// iterate over all points, assigning each to the closest canopy and outputting that clustering
fs = FileSystem.get(input.toUri(), conf);
status = fs.listStatus(input, new OutputLogFilter());
int part = 0;
for (FileStatus s : status) {
SequenceFile.Reader reader = new SequenceFile.Reader(fs, s.getPath(), conf);
SequenceFile.Writer writer = new SequenceFile.Writer(fs,
conf,