Background

We plan to define seatunnel job in web. The web need to know the options
and option rules about the Source/Transform/Sink plugin. So we need let the
plugin return the options and rules.
Design1. How to define a option

In the seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration we
already have Option class to define a option.
2. How to define option rule

In the
seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util we
can see OptionRule and Expression. OptionRule is used to define the basic
rules and Expression is used to define the complex conditional judgment.
3. How to let the web server to know the plugin options and option rules

seatunnel-plugin-discovery is a module which is used to load the connectors
from dir. Use AbstractPluginDiscovery use can get all connectors in the
plugin dir.

seatunnel-plugin-discovery only dependency seatunnel-api and
seatunnel-common, we can make the seatunnel web server dependency
seatunnel-plugin-discovery. Then seatunnel web server can get all
connectors and connector options and option rules by
AbstractPluginDiscovery when
it start and the storage them in memory.
4. What needs to be done now

I need add a method to PluginIdentifierInterface. All connector need
implement this interface and method.


OptionRule getOptionRule();


We already have 60+ connectors now. In order to modify these completed
connectors step by step, I will provide a default implementation, which
returns null.


default OptionRule getOptionRule() {
    return null;
}

The issue link: https://github.com/apache/incubator-seatunnel/issues/3272


-- 

Best Regards

------------

EricJoy2048
[email protected]

Reply via email to