FileSystem hdfs = path.getFileSystem(conf);
hdfs.deleteOnExit(path);
Writer w = SequenceFile.createWriter(hdfs, conf, path,
WriteableEventKey.class, WriteableEvent.class);
b.mark("hdfs_fileopen_started");
Event e = null;
while ((e = mem.next()) != null) {
// writing
w.append(new WriteableEventKey(e), new WriteableEvent(e));