fe/src/main/java/org/apache/doris/plugin/PluginMgr.java
public void loadDynamicPlugin(PluginInfo info) throws IOException, UserException {
        DynamicPluginLoader pluginLoader = new DynamicPluginLoader(Config.plugin_dir, info);

        try {
            PluginLoader checkLoader = plugins[info.getTypeId()].putIfAbsent(info.getName(), pluginLoader);

            if (checkLoader != null) {
                throw new UserException(
                        "plugin " + info.getName() + " has already been installed.");
            }

            pluginLoader.setStatus(PluginStatus.INSTALLING);
            // install plugin
            pluginLoader.reload();
            pluginLoader.setStatus(PluginStatus.INSTALLED);
        } catch (IOException | UserException e) {
            pluginLoader.setStatus(PluginStatus.ERROR);
            throw e;
        }
    }
/**
     * Load plugin:
     * - if has already benn installed, return
     * - if not installed, install
     */
Load plugin:
- if has already benn installed, return
- if not installed, install
Load plugin : - if has already benn installed return - if not installed install
public void loadDynamicPlugin(PluginInfo info) throws IOException, UserException {
        DynamicPluginLoader pluginLoader = new DynamicPluginLoader(Config.plugin_dir, info);
        try {
            PluginLoader checkLoader = plugins[info.getTypeId()].putIfAbsent(info.getName(), pluginLoader);
            if (checkLoader != null) {
                throw new UserException(
                        "plugin " + info.getName() + " has already been installed.");
            }
            pluginLoader.setStatus(PluginStatus.INSTALLING);
            pluginLoader.reload();
            pluginLoader.setStatus(PluginStatus.INSTALLED);
        } catch (IOException | UserException e) {
            pluginLoader.setStatus(PluginStatus.ERROR);
            throw e;
        }
    }
public void loadDynamicPlugin ( PluginInfo info ) throws IOException , UserException { DynamicPluginLoader pluginLoader = new DynamicPluginLoader ( Config . plugin_dir , info ) ; try { PluginLoader checkLoader = plugins [ info . getTypeId ( ) ] . putIfAbsent ( info . getName ( ) , pluginLoader ) ; if ( checkLoader != null ) { throw new UserException ( "plugin " + info . getName ( ) + " has already been installed." ) ; } pluginLoader . setStatus ( PluginStatus . INSTALLING ) ; pluginLoader . reload ( ) ; pluginLoader . setStatus ( PluginStatus . INSTALLED ) ; } catch ( IOException | UserException e ) { pluginLoader . setStatus ( PluginStatus . ERROR ) ; throw e ; } }
Load plugin:
 - if has already benn installed, return
 - if not installed, install
Load plugin : - if has already benn installed return - if not installed install
// install plugin