Path path = new Path(outPath, "largestCleanEigens");
Configuration conf = getConf();
FileSystem fs = FileSystem.get(conf);
SequenceFile.Writer seqWriter = new SequenceFile.Writer(fs, conf, path, IntWritable.class, VectorWritable.class);
VectorWritable vw = new VectorWritable();
IntWritable iw = new IntWritable();
for(Map.Entry<MatrixSlice,EigenStatus> pruneSlice : prunedEigenMeta) {
MatrixSlice s = pruneSlice.getKey();
EigenStatus meta = pruneSlice.getValue();
EigenVector ev = new EigenVector((DenseVector)s.vector(),
meta.getEigenValue(),
Math.abs(1-meta.getCosAngle()),
s.index());
log.info("appending " + ev.getName() + " to " + path.toString());
vw.set(ev);
iw.set(s.index());
seqWriter.append(iw, vw);
}
seqWriter.close();
}