public void removeFile(final Path walArchiveDir) throws IOException {
    close();
    boolean archived = false;
    if (walArchiveDir != null) {
      Path archivedFile = new Path(walArchiveDir, logFile.getName());
      LOG.info("Archiving " + logFile + " to " + archivedFile);
      if (!fs.rename(logFile, archivedFile)) {
        LOG.warn("Failed archive of " + logFile + ", deleting");
      } else {
        archived = true;
      }
    }
    if (!archived) {
      if (!fs.delete(logFile, false)) {
        LOG.warn("Failed delete of " + logFile);
      }
    }
  }
Used to update in-progress log sizes. the FileStatus will report 0 otherwise.
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALFile.java