chia7712 commented on code in PR #19487:
URL: https://github.com/apache/kafka/pull/19487#discussion_r2047445230


##########
server/src/main/java/org/apache/kafka/server/config/DynamicConfig.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * 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.kafka.server.config;
+
+import org.apache.kafka.common.config.AbstractConfig;
+import org.apache.kafka.common.config.ConfigDef;
+import org.apache.kafka.common.utils.Utils;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+public class DynamicConfig {

Review Comment:
   those helpers are used by `ConfigCommand` only, so please remove inline this 
whole class.



##########
server/src/main/java/org/apache/kafka/server/config/DynamicConfig.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * 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.kafka.server.config;
+
+import org.apache.kafka.common.config.AbstractConfig;
+import org.apache.kafka.common.config.ConfigDef;
+import org.apache.kafka.common.utils.Utils;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+public class DynamicConfig {
+
+
+    public static class Client {
+        private static final ConfigDef CLIENT_CONFIGS = 
QuotaConfig.userAndClientQuotaConfigs();
+
+        public static Map<String, ConfigDef.ConfigKey> configKeys() {
+            return CLIENT_CONFIGS.configKeys();
+        }
+
+        public static Set<String> names() {
+            return CLIENT_CONFIGS.names();
+        }
+
+        public static Map<String, Object> validate(Properties props) {
+            return DynamicConfig.validate(CLIENT_CONFIGS, props, false);
+        }
+    }
+
+    public static class User {
+        private static final ConfigDef USER_CONFIGS = 
QuotaConfig.scramMechanismsPlusUserAndClientQuotaConfigs();
+
+        public static Map<String, ConfigDef.ConfigKey> configKeys() {
+            return USER_CONFIGS.configKeys();
+        }
+
+        public static Set<String> names() {
+            return USER_CONFIGS.names();
+        }
+
+        public static Map<String, Object> validate(Properties props) {

Review Comment:
   those method is useless, so please remove it.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to