@Override
  public void append(EntryBuffers.RegionEntryBuffer buffer) throws IOException {
    List<WAL.Entry> entries = buffer.entryBuffer;
    if (entries.isEmpty()) {
      LOG.warn("got an empty buffer, skipping");
      return;
    }
    // The key point is create a new writer, write edits then close writer.
    RecoveredEditsWriter writer = createRecoveredEditsWriter(buffer.tableName,
      buffer.encodedRegionName, entries.get(0).getKey().getSequenceId());
    if (writer != null) {
      openingWritersNum.incrementAndGet();
      writer.writeRegionEntries(entries);
      regionEditsWrittenMap.compute(Bytes.toString(buffer.encodedRegionName),
        (k, v) -> v == null ? writer.editsWritten : v + writer.editsWritten);
      List<IOException> thrown = new ArrayList<>();
      Path dst = closeRecoveredEditsWriterAndFinalizeEdits(writer, thrown);
      splits.add(dst);
      openingWritersNum.decrementAndGet();
      if (!thrown.isEmpty()) {
        throw MultipleIOException.createIOException(thrown);
      }
    }
  }
Class that manages the output streams from the log splitting process. Every region may have many
recovered edits file. But the opening writers is bounded. Bounded means the output streams will
be no more than the size of threadpool.
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/BoundedRecoveredEditsOutputSink.java