private void initializeRegionReplicationSink(CancelableProgressable reporter,
    MonitoredTask status) {
    RegionServerServices rss = getRegionServerServices();
    TableDescriptor td = getTableDescriptor();
    int regionReplication = td.getRegionReplication();
    RegionInfo regionInfo = getRegionInfo();
    if (
      regionReplication <= 1 || !RegionReplicaUtil.isDefaultReplica(regionInfo)
        || !ServerRegionReplicaUtil.isRegionReplicaReplicationEnabled(conf, regionInfo.getTable())
        || rss == null
    ) {
      regionReplicationSink = Optional.empty();
      return;
    }
    status.setStatus("Initializaing region replication sink");
    regionReplicationSink = Optional.of(new RegionReplicationSink(conf, regionInfo, td,
      rss.getRegionReplicationBufferManager(), () -> rss.getFlushRequester().requestFlush(this,
        new ArrayList<>(td.getColumnFamilyNames()), FlushLifeCycleTracker.DUMMY),
      rss.getAsyncClusterConnection()));
  }
Initialize this region.
@param reporter Tickle every so often if initialize is taking a while.
@return What the next sequence (edit) id should be.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java