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

项目:hbase-secondary-index    文件:THLog.java   
/**
 * Get a reader for the WAL.
 * 
 * @param fs
 * @param path
 * @param conf
 * @return A WAL reader. Close when done with it.
 * @throws IOException
 */
public static Reader getReader(final FileSystem fs, final Path path,
        final Configuration conf) throws IOException {
    try {
        HLog.Reader reader = new SequenceFileLogReader(THLogKey.class);
        reader.init(fs, path, conf);
        return reader;
    } catch (Exception e) {
        IOException ie = new IOException("cannot get log reader");
        ie.initCause(e);
        throw ie;
    }
}