private void replayWAL(String wal) throws IOException {
    WALStreamReader reader = getReader(wal);
    if (reader == null) {
      return;
    }
    try {
      List<Entry> entries = readWALEntries(reader, wal);
      while (!entries.isEmpty()) {
        Pair<AdminProtos.ReplicateWALEntryRequest, ExtendedCellScanner> pair =
          ReplicationProtobufUtil
            .buildReplicateWALEntryRequest(entries.toArray(new Entry[entries.size()]));
        ReplicateWALEntryRequest request = pair.getFirst();
        rs.getReplicationSinkService().replicateLogEntries(request.getEntryList(), pair.getSecond(),
          request.getReplicationClusterId(), request.getSourceBaseNamespaceDirPath(),
          request.getSourceHFileArchiveDirPath());
        // Read next entries.
        entries = readWALEntries(reader, wal);
      }
    } finally {
      reader.close();
    }
  }
This callable executed at RS side to replay sync replication wal.
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplaySyncReplicationWALCallable.java