Java 类org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogWriter 实例源码

项目:hbase-secondary-index    文件:THLog.java   
/**
 * 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;
    }
}