public DeletionResource listenToDeleteData(
      final String regionId, final AbstractDeleteDataNode node) {
    final PipeDataRegionAssigner assigner = dataRegionId2Assigner.get(regionId);
    // only events from registered data region will be extracted
    if (assigner == null) {
      return null;
    }

    final DeletionResource deletionResource;
    // register a deletionResource and return it to DataRegion
    final DeletionResourceManager manager = DeletionResourceManager.getInstance(regionId);
    // deleteNode generated by remote consensus leader shouldn't be persisted to DAL.
    if (Objects.nonNull(manager) && DeletionResource.isDeleteNodeGeneratedInLocalByIoTV2(node)) {
      deletionResource = manager.registerDeletionResource(node);
      // if persist failed, skip sending/publishing this event to keep consistency with the
      // behavior of storage engine.
      if (deletionResource.waitForResult() == DeletionResource.Status.FAILURE) {
        return deletionResource;
      }
    } else {
      deletionResource = null;
    }

    assigner.publishToAssign(PipeRealtimeEventFactory.createRealtimeEvent(regionId, node));

    return deletionResource;
  }
PipeInsertionEventListener is a singleton in each data node.

<p>It is used to listen to events from storage engine and publish them to pipe engine.

<p>2 kinds of events are extracted: 1. level-0 tsfile sealed event 2. insertion operation event

<p>All events extracted by this listener will be first published to different
PipeEventDataRegionAssigners (identified by data region id), and then PipeEventDataRegionAssigner
will filter events and assign them to different PipeRealtimeEventDataRegionExtractors.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/extractor/dataregion/realtime/listener/PipeInsertionDataNodeListener.java