gaojun2048 opened a new issue #3189: URL: https://github.com/apache/incubator-dolphinscheduler/issues/3189
A subtask of https://github.com/apache/incubator-dolphinscheduler/issues/3049 ## Database table design ### Plugin definition table plugin_define id, plugin_name, plugin_type plugin_params ### Plugin instance table plugin_instance id plugin_define_id, plugin_instance_params ## Interface design ### incubator-dolphinscheduler-maven-plugin A custom maven plug-in, its role is to automatically check the spi and plug-in related dependencies, and can support adding dolphinscheduler-plugin logo in the pom file to allow DS to automatically generate related META-INF/services files at compile time. For detailed information, please refer to: https://github.com/gaojun2048/incubator-dolphinscheduler-maven-plugin ## SPI ### DolphinSchedulerPlugin DS plug-in top-level interface, all DS plug-ins must implement this interface ### AlertChannelFactory Alert plug-in factory interface. All alert plug-ins need to implement this interface. This interface is used to define the name of the alert plug-in and the required parameters. The create method is used to create a specific alert plug-in instance. ### AlertChannel The interface of the alert plug-in. The alert plug-in needs to implement this interface. There is only one method process in the interface. The upper alert system will use this method and obtain the return information of the alert through the AlertResult returned by the method. ### AlertData alert content information, including id, title, content, log. ### AlertInfo For alert-related information, when an upper-layer system calls an alert plug-in instance, the instance of this type is passed into the specific alert plug-in through the process method. It contains the alert content AlertData and the parameter information filled in by the front end of the alert plug-in instance called. ### AlertResult The alert plugin sends alert return information. ### org.apache.dolphinscheduler.spi.params Under this package is the plug-in parameter definition. Our front-end uses the front-end library http://www.form-create.com, which can dynamically generate the front-end based on the parameter list json returned by the plug-in definition Ui. Under this package, we currently only encapsulate RadioParam, InputParam, and PasswordParam, which are used to define text type parameters, radio parameters, and password type parameters, respectively. PluginParams This class is the base class for all parameters, and these classes inherit from RadioParam. Each DS alert plugin will return a list of AbsPluginParams in the implementation of AlertChannelFactory. ### org.apache.dolphinscheduler.alert.plugin Under this package is the relevant code for the DS Alert module to load the Alert plug-in. In the AlertChannelManager class, we also need to save the loaded plugin to the database's plugin_define table. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
