private void deleteFile(final File file) {
    if (file.exists()) {
      try {
        RetryUtils.retryOnException(() -> FileUtils.delete(file));
        LOGGER.info(
            "Receiver id = {}: Original writing file {} was deleted.",
            receiverId.get(),
            file.getPath());
      } catch (final Exception e) {
        LOGGER.warn(
            "Receiver id = {}: Failed to delete original writing file {}, because {}.",
            receiverId.get(),
            file.getPath(),
            e.getMessage(),
            e);
      }
    } else {
      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(
            "Receiver id = {}: Original file {} is not existed. No need to delete.",
            receiverId.get(),
            file.getPath());
      }
    }
  }
{@link IoTDBFileReceiver} is the parent class of receiver on both configNode and DataNode,
handling all the logic of parallel file receiving.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/IoTDBFileReceiver.java