private void writeCompactionWalRecord(Collection<HStoreFile> filesCompacted,
    Collection<HStoreFile> newFiles) throws IOException {
    if (region.getWAL() == null) {
      return;
    }
    List<Path> inputPaths =
      filesCompacted.stream().map(HStoreFile::getPath).collect(Collectors.toList());
    List<Path> outputPaths =
      newFiles.stream().map(HStoreFile::getPath).collect(Collectors.toList());
    RegionInfo info = this.region.getRegionInfo();
    CompactionDescriptor compactionDescriptor = ProtobufUtil.toCompactionDescriptor(info,
      getColumnFamilyDescriptor().getName(), inputPaths, outputPaths,
      getRegionFileSystem().getStoreDir(getColumnFamilyDescriptor().getNameAsString()));
    // Fix reaching into Region to get the maxWaitForSeqId.
    // Does this method belong in Region altogether given it is making so many references up there?
    // Could be Region#writeCompactionMarker(compactionDescriptor);
    WALUtil.writeCompactionMarker(this.region.getWAL(), this.region.getReplicationScope(),
      this.region.getRegionInfo(), compactionDescriptor, this.region.getMVCC(),
      region.getRegionReplicationSink().orElse(null));
  }
Writes the compaction WAL record.
@param filesCompacted Files compacted (input).
@param newFiles       Files from compaction.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java