wuchong commented on PR #2364:
URL: https://github.com/apache/fluss/pull/2364#issuecomment-3776852781
Thanks @luoyuxia! However, the current approach still feels quite hacky—it
relies on class overriding and could lead to various issues, such as
compilation failures or runtime incompatibilities.
If our goal is to make this truly pluggable, we should design a proper
plugin mechanism instead—ideally based on a standard pattern like Java SPI.
For example, if the only environment-specific customization needed is around
Flink execution environment and configuration, we could introduce a clean
extension point like this:
```java
interface LakeTieringDecoratorPlugin extends Plugin {
String identifier();
LakeTieringDecorator createLakeTieringDecorator();
}
interface LakeTieringDecorator {
// Customize Flink env or configs as needed
void decorate(
StreamExecutionEnvironment env,
Configuration flussConfig,
Configuration dataLakeConfig,
Configuration lakeTieringConfig,
String dataLakeFormat
);
}
```
This way, different environments (e.g., internal vs. public cloud) can
provide their own decorator implementations without touching core code,
ensuring better maintainability, testability, and forward compatibility.
--
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]