/** * Get a writer for the WAL. * * @param path * @param conf * @return A WAL writer. Close when done with it. * @throws IOException */ public static Writer createWriter(final FileSystem fs, final Path path, final Configuration conf) throws IOException { try { HLog.Writer writer = new SequenceFileLogWriter(THLogKey.class); writer.init(fs, path, conf); return writer; } catch (Exception e) { IOException ie = new IOException("cannot get log writer"); ie.initCause(e); throw ie; } }