public static void finishSplitLogFile(String logfile, Configuration conf) throws IOException {
    Path walDir = CommonFSUtils.getWALRootDir(conf);
    Path oldLogDir = new Path(walDir, HConstants.HREGION_OLDLOGDIR_NAME);
    Path walPath;
    if (CommonFSUtils.isStartingWithPath(walDir, logfile)) {
      walPath = new Path(logfile);
    } else {
      walPath = new Path(walDir, logfile);
    }
    FileSystem walFS = walDir.getFileSystem(conf);
    boolean corrupt = ZKSplitLog.isCorrupted(walDir, walPath.getName(), walFS);
    archive(walPath, corrupt, oldLogDir, walFS, conf);
    Path stagingDir = ZKSplitLog.getSplitLogDir(walDir, walPath.getName());
    walFS.delete(stagingDir, true);
  }
Completes the work done by splitLogFile by archiving logs
<p>
It is invoked by SplitLogManager once it knows that one of the SplitLogWorkers have completed
the splitLogFile() part. If the master crashes then this function might get called multiple
times.
<p>
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitUtil.java