OmniaGM commented on code in PR #23843:
URL: https://github.com/apache/kafka/pull/23843#discussion_r4341758431


##########
mirror-coordinator/src/main/java/org/apache/kafka/coordinator/mirror/ClusterMirrorConfig.java:
##########
@@ -0,0 +1,483 @@
+/*
+ * 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.coordinator.mirror;
+
+import org.apache.kafka.clients.CommonClientConfigs;
+import org.apache.kafka.common.acl.AclBinding;
+import org.apache.kafka.common.acl.AclOperation;
+import org.apache.kafka.common.acl.AclPermissionType;
+import org.apache.kafka.common.config.AbstractConfig;
+import org.apache.kafka.common.config.ConfigDef;
+import org.apache.kafka.common.config.ConfigException;
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.resource.ResourceType;
+import org.apache.kafka.common.security.auth.SecurityProtocol;
+
+import com.google.re2j.Pattern;
+import com.google.re2j.PatternSyntaxException;
+
+import java.util.List;
+import java.util.Locale;
+import java.util.Properties;
+
+import static org.apache.kafka.common.config.ConfigDef.Importance.HIGH;
+import static org.apache.kafka.common.config.ConfigDef.Importance.LOW;
+import static org.apache.kafka.common.config.ConfigDef.Importance.MEDIUM;
+import static org.apache.kafka.common.config.ConfigDef.Range.atLeast;
+import static org.apache.kafka.common.config.ConfigDef.Type.INT;
+import static org.apache.kafka.common.config.ConfigDef.Type.LIST;
+import static org.apache.kafka.common.config.ConfigDef.Type.LONG;
+import static org.apache.kafka.common.config.ConfigDef.Type.STRING;
+import static org.apache.kafka.server.util.MirrorUtils.compilePattern;
+import static org.apache.kafka.server.util.MirrorUtils.compilePatternList;
+
+/**
+ * Cluster Mirror configurations.
+ * Set when creating/altering a specific mirror.
+ * Stored in cluster metadata.
+ */
+public final class ClusterMirrorConfig extends AbstractConfig {
+    public static final String BOOTSTRAP_SERVERS_CONFIG = 
CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG;
+    private static final String BOOTSTRAP_SERVERS_DOC = "A list of host/port 
pairs to use for establishing the initial connection to the source cluster. " +
+            "This is a required configuration when creating a cluster mirror.";
+
+    public static final String SOURCE_CLUSTER_ID_CONFIG = 
CommonClientConfigs.SOURCE_CLUSTER_ID_CONFIG;
+    private static final String SOURCE_CLUSTER_ID_DOC = 
CommonClientConfigs.SOURCE_CLUSTER_ID_DOC;
+
+    public static final String REQUEST_TIMEOUT_MS_CONFIG = 
CommonClientConfigs.REQUEST_TIMEOUT_MS_CONFIG;
+    private static final String REQUEST_TIMEOUT_MS_DOC = 
CommonClientConfigs.REQUEST_TIMEOUT_MS_DOC;
+    private static final int REQUEST_TIMEOUT_MS_DEFAULT = 30 * 1000;
+
+    public static final String CONNECTION_SETUP_TIMEOUT_MS_CONFIG = 
CommonClientConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MS_CONFIG;
+    private static final String CONNECTION_SETUP_TIMEOUT_MS_DOC = 
CommonClientConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MS_DOC;
+    private static final long CONNECTION_SETUP_TIMEOUT_MS_DEFAULT = 
CommonClientConfigs.DEFAULT_SOCKET_CONNECTION_SETUP_TIMEOUT_MS;
+
+    public static final String CONNECTION_SETUP_TIMEOUT_MAX_MS_CONFIG = 
CommonClientConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS_CONFIG;
+    private static final String CONNECTION_SETUP_TIMEOUT_MAX_MS_DOC = 
CommonClientConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS_DOC;
+    private static final long CONNECTION_SETUP_TIMEOUT_MAX_MS_DEFAULT = 
CommonClientConfigs.DEFAULT_SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS;
+
+    public static final String CONNECTIONS_MAX_IDLE_MS_CONFIG = 
CommonClientConfigs.CONNECTIONS_MAX_IDLE_MS_CONFIG;
+    private static final String CONNECTIONS_MAX_IDLE_MS_DOC = 
CommonClientConfigs.CONNECTIONS_MAX_IDLE_MS_DOC;
+    private static final long CONNECTIONS_MAX_IDLE_MS_DEFAULT = 10 * 60 * 
1000L;
+
+    public static final String SOCKET_TIMEOUT_MS_CONFIG = "socket.timeout.ms";
+    private static final String SOCKET_TIMEOUT_MS_DOC = "The socket timeout 
for network requests.";
+    private static final int SOCKET_TIMEOUT_MS_DEFAULT = 30 * 1000;
+
+    public static final String SOCKET_RECEIVE_BUFFER_BYTES_CONFIG = 
"socket.receive.buffer.bytes";
+    private static final String SOCKET_RECEIVE_BUFFER_BYTES_DOC = "The socket 
receive buffer for network requests to the leader for replicating data.";

Review Comment:
   Small one: the doc still says "to the leader for replicating data". Maybe 
"to the source cluster"?



-- 
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]

Reply via email to