private WALStreamReader getReader(String wal) throws IOException {
    Path path = new Path(rs.getWALRootDir(), wal);
    try {
      RecoverLeaseFSUtils.recoverFileLease(rs.getWALFileSystem(), path, rs.getConfiguration());
      return WALFactory.createStreamReader(rs.getWALFileSystem(), path, rs.getConfiguration());
    } catch (WALHeaderEOFException e) {
      LOG.warn("EOF while opening WAL reader for {}", path, e);
      return null;
    }
  }
This callable executed at RS side to replay sync replication wal.
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplaySyncReplicationWALCallable.java