Guosmilesmile commented on code in PR #12979: URL: https://github.com/apache/iceberg/pull/12979#discussion_r2114266958
########## flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/maintenance/api/FlinkMaintenanceConfig.java: ########## @@ -0,0 +1,89 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iceberg.flink.maintenance.api; + +import java.util.Map; +import org.apache.flink.api.common.ExecutionConfig; +import org.apache.flink.configuration.ReadableConfig; +import org.apache.flink.streaming.api.graph.StreamGraphGenerator; +import org.apache.iceberg.Table; +import org.apache.iceberg.flink.FlinkConfParser; +import org.apache.iceberg.flink.maintenance.operator.LockConfig; + +public class FlinkMaintenanceConfig { + + public static final String PREFIX = "flink-maintenance."; + public static final String RATE_LIMIT = PREFIX + "rate-limit-seconds"; + public static final String SLOT_SHARING_GROUP = PREFIX + "slot-sharing-group"; + public static final String LOCK_CHECK_DELAY = PREFIX + "lock-check-delay-seconds"; + public static final String PARALLELISM = PREFIX + "parallelism"; + + private final FlinkConfParser confParser; + private final Table table; + private final Map<String, String> writeProperties; + private final ReadableConfig readableConfig; + + public FlinkMaintenanceConfig( + Table table, Map<String, String> writeOptions, ReadableConfig readableConfig) { + this.table = table; + this.readableConfig = readableConfig; + this.writeProperties = writeOptions; + this.confParser = new FlinkConfParser(table, writeOptions, readableConfig); + } + + public long rateLimit() { + return confParser + .longConf() + .option(RATE_LIMIT) Review Comment: If `.flinkConfig(RATE_LIMIT_OPTION)` is added, it means supporting configuration through `set`, thus supporting both SQL hints and `set`. Currently, I have only implemented the dual injection logic for the lock-related configuration. Do other configurations also need this support? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org