platinumhamburg commented on code in PR #2178: URL: https://github.com/apache/fluss/pull/2178#discussion_r2622861962
########## fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/procedure/SetSharedRocksDBRateLimiterProcedure.java: ########## @@ -0,0 +1,108 @@ +/* + * 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.fluss.flink.procedure; + +import org.apache.fluss.config.ConfigOptions; +import org.apache.fluss.config.MemorySize; +import org.apache.fluss.config.cluster.AlterConfig; +import org.apache.fluss.config.cluster.AlterConfigOpType; +import org.apache.fluss.config.cluster.ConfigEntry; + +import org.apache.flink.table.annotation.ArgumentHint; +import org.apache.flink.table.annotation.DataTypeHint; +import org.apache.flink.table.annotation.ProcedureHint; +import org.apache.flink.table.procedure.ProcedureContext; + +import java.util.Collection; +import java.util.Collections; + +/** + * Procedure to set RocksDB rate limiter dynamically via cluster configuration. The configuration + * will be persisted in ZooKeeper and applied to all TabletServers. + * + * <p>Usage examples: + * + * <pre> + * -- Set rate limiter to 200MB/s + * CALL sys.set_shared_rocksdb_rate_limiter('200MB'); + * + * -- Set rate limiter to 1GB/s + * CALL sys.set_shared_rocksdb_rate_limiter('1GB'); + * </pre> + */ +public class SetSharedRocksDBRateLimiterProcedure extends ProcedureBase { Review Comment: I reimplemented a generic one. -- 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]
