ruanwenjun commented on PR #1857:
URL:
https://github.com/apache/incubator-seatunnel/pull/1857#issuecomment-1124451658
I think the `checkConfig` is needed, and the current execute flow is like
below:
```java
Plugin<?> plugin = new PluginA<>();
plugin.setConfig(Config);
CheckResult checkResult = plugin.checkConfig();
if (checkResult.getSuccess()) {
plugin.prepare();
// plugin execute code
plugin.close();
}
```
We will execute the prepare method is execute after checkConfig. We set the
default value at prepare method, if the default value is wrong, it will not be
checked again.
I suggest we set the default value at setConfig method, and prepare method
is used to do some initialize action, is not used to set default config value.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]