public TSStatus createPipePlugin(final CreatePipePluginPlan createPipePluginPlan) {
    try {
      final PipePluginMeta pipePluginMeta = createPipePluginPlan.getPipePluginMeta();
      final String pluginName = pipePluginMeta.getPluginName();

      // try to drop the old pipe plugin if exists to reduce the effect of the inconsistency
      dropPipePlugin(new DropPipePluginPlan(pluginName));

      pipePluginMetaKeeper.addPipePluginMeta(pluginName, pipePluginMeta);
      pipePluginMetaKeeper.addJarNameAndMd5(
          pipePluginMeta.getJarName(), pipePluginMeta.getJarMD5());

      if (createPipePluginPlan.getJarFile() != null) {
        pipePluginExecutableManager.savePluginToInstallDir(
            ByteBuffer.wrap(createPipePluginPlan.getJarFile().getValues()),
            pluginName,
            pipePluginMeta.getJarName());
        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;
        }
      }

      return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
    } catch (final Exception e) {
      final String errorMessage =
          String.format(
              "Failed to execute createPipePlugin(%s) on config nodes, because of %s",
              createPipePluginPlan.getPipePluginMeta().getPluginName(), e);
      LOGGER.warn(errorMessage, e);
      return new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode())
          .setMessage(errorMessage);
    }
  }
@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