LiebingYu commented on code in PR #1937:
URL: https://github.com/apache/fluss/pull/1937#discussion_r2523077190
##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalogFactory.java:
##########
@@ -54,15 +57,22 @@ public Set<ConfigOption<?>> optionalOptions() {
public FlinkCatalog createCatalog(Context context) {
final FactoryUtil.CatalogFactoryHelper helper =
FactoryUtil.createCatalogFactoryHelper(this, context);
- helper.validateExcept(CLIENT_SECURITY_PREFIX);
+ helper.validateExcept(
+ Stream.concat(
+ Stream.of(CLIENT_SECURITY_PREFIX),
+ Arrays.stream(DataLakeFormat.values())
+ .map(DataLakeFormat::toString))
+ .toArray(String[]::new));
Review Comment:
I suggest to make it extensiable. Thus if the subclass want to support new
configs, they don't need to overwrite `createCatalog`.
```java
protected static final List<String> ALLOW_CATALOG_CONFIG_PREFIX = new
ArrayList<>();
static {
ALLOW_CATALOG_CONFIG_PREFIX.add(CLIENT_SECURITY_PREFIX);
// support lake catalog options
for (DataLakeFormat value : DataLakeFormat.values()) {
ALLOW_CATALOG_CONFIG_PREFIX.add(value.toString());
}
}
```
--
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]