private static void cleanSnapshotDir() {
    final File pipeConsensusDir =
        new File(
            IoTDBDescriptor.getInstance().getConfig().getConsensusDir()
                + File.separator
                + PipeSnapshotResourceManager.PIPE_SNAPSHOT_DIR_NAME);
    if (pipeConsensusDir.isDirectory()) {
      LOGGER.info("Pipe snapshot dir found, deleting it: {},", pipeConsensusDir);
      org.apache.iotdb.commons.utils.FileUtils.deleteFileOrDirectory(pipeConsensusDir);
    }
  }
Delete the data directory and all of its subdirectories that contain the
PipeConfig.PIPE_TSFILE_DIR_NAME directory.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/PipeDataNodeHardlinkOrCopiedFileDirStartupCleaner.java