/** * Reads a log file and outputs its contents. * * @param conf HBase configuration relevant to this log file * @param p path of the log file to be read * @throws IOException IOException */ public void processFile(final Configuration conf, final Path p) throws IOException { FileSystem fs = p.getFileSystem(conf); if (!fs.exists(p)) { System.err.println("ERROR, file doesnt exist: " + p); return; } if (!fs.isFile(p)) { System.err.println(p + " is not a file"); return; } FileStatus logFile = fs.getFileStatus(p); if (logFile.getLen() == 0) { out.println("Zero length file: " + p); return; } out.println("Opening procedure state-log: " + p); ProcedureWALFile log = new ProcedureWALFile(fs, logFile); processProcedureWALFile(log); }
final ProcedureWALFile log = new ProcedureWALFile(fs, logFile); if (logFile.getLen() == 0) { LOG.warn("Remove uninitialized log: {}", logFile);
long rollTs = System.currentTimeMillis(); lastRollTs.set(rollTs); logs.add(new ProcedureWALFile(fs, newLogFile, header, startPos, rollTs));
/** * Reads a log file and outputs its contents. * * @param conf HBase configuration relevant to this log file * @param p path of the log file to be read * @throws IOException IOException */ public void processFile(final Configuration conf, final Path p) throws IOException { FileSystem fs = p.getFileSystem(conf); if (!fs.exists(p)) { System.err.println("ERROR, file doesnt exist: " + p); return; } if (!fs.isFile(p)) { System.err.println(p + " is not a file"); return; } FileStatus logFile = fs.getFileStatus(p); if (logFile.getLen() == 0) { out.println("Zero length file: " + p); return; } out.println("Opening procedure state-log: " + p); ProcedureWALFile log = new ProcedureWALFile(fs, logFile); processProcedureWALFile(log); }
/** * Reads a log file and outputs its contents. * * @param conf HBase configuration relevant to this log file * @param p path of the log file to be read * @throws IOException IOException */ public void processFile(final Configuration conf, final Path p) throws IOException { FileSystem fs = p.getFileSystem(conf); if (!fs.exists(p)) { System.err.println("ERROR, file doesnt exist: " + p); return; } if (!fs.isFile(p)) { System.err.println(p + " is not a file"); return; } FileStatus logFile = fs.getFileStatus(p); if (logFile.getLen() == 0) { out.println("Zero length file: " + p); return; } out.println("Opening procedure state-log: " + p); ProcedureWALFile log = new ProcedureWALFile(fs, logFile); processProcedureWALFile(log); }
final ProcedureWALFile log = new ProcedureWALFile(fs, logFile); if (logFile.getLen() == 0) { LOG.warn("Remove uninitialized log: " + logFile);
final ProcedureWALFile log = new ProcedureWALFile(fs, logFile); if (logFile.getLen() == 0) { LOG.warn("Remove uninitialized log: {}", logFile);
long rollTs = System.currentTimeMillis(); lastRollTs.set(rollTs); logs.add(new ProcedureWALFile(fs, newLogFile, header, startPos, rollTs));
long rollTs = System.currentTimeMillis(); lastRollTs.set(rollTs); logs.add(new ProcedureWALFile(fs, newLogFile, header, startPos, rollTs));
totalSynced.set(0); lastRollTs.set(System.currentTimeMillis()); logs.add(new ProcedureWALFile(fs, newLogFile, header, startPos));
private ProcedureWALFile initOldLog(final FileStatus logFile) throws IOException { ProcedureWALFile log = new ProcedureWALFile(fs, logFile); if (logFile.getLen() == 0) { LOG.warn("Remove uninitialized log: " + logFile);