@Override
  public void process(TsFileInsertionEvent tsFileInsertionEvent, EventCollector eventCollector)
      throws Exception {
    if (shouldSplitFile) {
      try {
        if (tsFileInsertionEvent instanceof PipeTsFileInsertionEvent) {
          final AtomicReference<Exception> ex = new AtomicReference<>();
          ((PipeTsFileInsertionEvent) tsFileInsertionEvent)
              .consumeTabletInsertionEventsWithRetry(
                  event -> {
                    try {
                      process(event, eventCollector);
                    } catch (Exception e) {
                      ex.set(e);
                    }
                  },
                  "DownSamplingProcessor::process");
          if (ex.get() != null) {
            throw ex.get();
          }
        } else {
          for (final TabletInsertionEvent tabletInsertionEvent :
              tsFileInsertionEvent.toTabletInsertionEvents()) {
            process(tabletInsertionEvent, eventCollector);
          }
        }
      } finally {
        tsFileInsertionEvent.close();
      }
    } else {
      eventCollector.collect(tsFileInsertionEvent);
    }
  }
If data comes in {@link TsFileInsertionEvent}, we will not split it into {@link
TabletInsertionEvent} by default, because the data in {@link TsFileInsertionEvent} is already
compressed, down-sampling may not reduce the size of data but will surely increase the CPU
usage.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/downsampling/DownSamplingProcessor.java