@Override
  public void processLoadSnapshot(final File snapshotDir) throws IOException {
    acquirePipePluginInfoLock();
    try {
      final File snapshotFile = new File(snapshotDir, SNAPSHOT_FILE_NAME);
      if (!snapshotFile.exists() || !snapshotFile.isFile()) {
        LOGGER.error(
            "Failed to load snapshot, snapshot file [{}] is not exist.",
            snapshotFile.getAbsolutePath());
        return;
      }

      try (final FileInputStream fileInputStream = new FileInputStream(snapshotFile)) {
        pipePluginMetaKeeper.processLoadSnapshot(fileInputStream);
      }

      for (final PipePluginMeta pipePluginMeta : pipePluginMetaKeeper.getAllPipePluginMeta()) {
        if (pipePluginMeta.isBuiltin()) {
          continue;
        }
        final String pluginName = pipePluginMeta.getPluginName();
        try {
          final String pluginDirPath = pipePluginExecutableManager.getPluginsDirPath(pluginName);
          final PipePluginClassLoader pipePluginClassLoader =
              classLoaderManager.createPipePluginClassLoader(pluginDirPath);
          try {
            final Class<?> pluginClass =
                Class.forName(pipePluginMeta.getClassName(), true, pipePluginClassLoader);
            pipePluginMetaKeeper.addPipePluginVisibility(
                pluginName, VisibilityUtils.calculateFromPluginClass(pluginClass));
            classLoaderManager.addPluginAndClassLoader(pluginName, pipePluginClassLoader);
          } catch (final Exception e) {
            try {
              pipePluginClassLoader.close();
            } catch (final Exception ignored) {
            }
            throw e;
          }
        } catch (final Exception e) {
          LOGGER.warn(
              "Failed to load plugin class for plugin [{}] when loading snapshot [{}] ",
              pluginName,
              snapshotFile.getAbsolutePath(),
              e);
        }
      }
    } finally {
      releasePipePluginInfoLock();
    }
  }
@return true if the pipe plugin is not created and the isSetIfExistsCondition is true, false
    otherwise
@throws PipeException if the pipe plugin is not created and the isSetIfExistsCondition is false
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipePluginInfo.java