public static void moveWAL(FileSystem fs, Path p, Path targetDir) throws IOException {
    if (fs.exists(p)) {
      if (!CommonFSUtils.renameAndSetModifyTime(fs, p, targetDir)) {
        LOG.warn("Failed move of {} to {}", p, targetDir);
      } else {
        LOG.info("Moved {} to {}", p, targetDir);
      }
    }
  }
Move WAL. Used to move processed WALs to archive or bad WALs to corrupt WAL dir. WAL may have
already been moved; makes allowance.
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitUtil.java