/** * 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; } }