@Test
  public void testReplayingCompactionWithFileAlreadyDeleted() throws IOException {
    // tests replaying compaction marker, but the compaction output file has already been compacted
    // from primary and also deleted from the archive directory
    secondaryRegion
      .replayWALCompactionMarker(
        CompactionDescriptor.newBuilder()
          .setTableName(UnsafeByteOperations
            .unsafeWrap(primaryRegion.getTableDescriptor().getTableName().getName()))
          .setEncodedRegionName(
            UnsafeByteOperations.unsafeWrap(primaryRegion.getRegionInfo().getEncodedNameAsBytes()))
          .setFamilyName(UnsafeByteOperations.unsafeWrap(families[0])).addCompactionInput("/123")
          .addCompactionOutput("/456").setStoreHomeDir("/store_home_dir")
          .setRegionName(
            UnsafeByteOperations.unsafeWrap(primaryRegion.getRegionInfo().getRegionName()))
          .build(),
        true, true, Long.MAX_VALUE);
  }
Tests replaying region open markers from primary region. Checks whether the files are picked up
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java