/** * Create a new {@link Writer} for writing log splits. */ protected Writer createWriter(FileSystem fs, Path logfile, Configuration conf) throws IOException { return HLog.createWriter(fs, logfile, conf); }
/** * This method allows subclasses to inject different writers without having to * extend other methods like rollWriter(). * * @param fs * @param path * @param conf * @return Writer instance * @throws IOException */ protected Writer createWriterInstance(final FileSystem fs, final Path path, final Configuration conf) throws IOException { return createWriter(fs, path, conf); }
public LogWriter(final Configuration conf, final FileSystem fs, final Path logDir, long seqId) throws IOException { logFile = new Path(logDir, logFileName(seqId, true)); this.writer = HLog.createWriter(fs, logFile, conf); this.seqId = seqId; }