// writing
FSDataOutputStream dos = hdfs.create(path);
hdfs.deleteOnExit(path);
// this version's Writer has ownOutputStream=false.
Writer writer = SequenceFile.createWriter(conf, dos,
WriteableEventKey.class, WriteableEvent.class,
SequenceFile.CompressionType.NONE, new DefaultCodec());
Event e = new EventImpl("EVENT".getBytes());
writer.append(new WriteableEventKey(e), new WriteableEvent(e));
writer.sync();
writer.close();
dos.close(); // It is strange that I have to close the underlying
// FSDataOutputStream.
// WTF: nothing written by this writer!