public static Path findArchivedLog(Path path, Configuration conf) throws IOException {
    // If the path contains oldWALs keyword then exit early.
    if (path.toString().contains(HConstants.HREGION_OLDLOGDIR_NAME)) {
      return null;
    }
    Path walRootDir = CommonFSUtils.getWALRootDir(conf);
    FileSystem fs = path.getFileSystem(conf);
    // Try finding the log in old dir
    Path oldLogDir = new Path(walRootDir, HConstants.HREGION_OLDLOGDIR_NAME);
    Path archivedLogLocation = new Path(oldLogDir, path.getName());
    if (fs.exists(archivedLogLocation)) {
      LOG.info("Log " + path + " was moved to " + archivedLogLocation);
      return archivedLogLocation;
    }

    ServerName serverName = getServerNameFromWALDirectoryName(path);
    if (serverName == null) {
      LOG.warn("Can not extract server name from path {}, "
        + "give up searching the separated old log dir", path);
      return null;
    }
    // Try finding the log in separate old log dir
    oldLogDir = new Path(walRootDir, new StringBuilder(HConstants.HREGION_OLDLOGDIR_NAME)
      .append(Path.SEPARATOR).append(serverName.getServerName()).toString());
    archivedLogLocation = new Path(oldLogDir, path.getName());
    if (fs.exists(archivedLogLocation)) {
      LOG.info("Log " + path + " was moved to " + archivedLogLocation);
      return archivedLogLocation;
    }
    LOG.error("Couldn't locate log: " + path);
    return null;
  }
Find the archived WAL file path if it is not able to locate in WALs dir.
@param path - active WAL file path
@param conf - configuration
@return archived path if exists, null - otherwise
@throws IOException exception
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java