[GitHub] [kafka] dielhennr commented on a change in pull request #10463: KAFKA-12670: support unclean.leader.election.enable in KRaft mode

2021-07-20 Thread GitBox


dielhennr commented on a change in pull request #10463:
URL: https://github.com/apache/kafka/pull/10463#discussion_r673531081



##
File path: 
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
##
@@ -374,6 +389,20 @@ void deleteTopicConfigs(String name) {
 configData.remove(new ConfigResource(Type.TOPIC, name));
 }
 
+ConfigResource currentNodeResource() {

Review comment:
   No, this method is used to access the private member 
`currentNodeResource` from outside of the class.




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




[GitHub] [kafka] dielhennr commented on a change in pull request #10463: KAFKA-12670: support unclean.leader.election.enable in KRaft mode

2021-07-20 Thread GitBox


dielhennr commented on a change in pull request #10463:
URL: https://github.com/apache/kafka/pull/10463#discussion_r673531081



##
File path: 
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
##
@@ -374,6 +389,20 @@ void deleteTopicConfigs(String name) {
 configData.remove(new ConfigResource(Type.TOPIC, name));
 }
 
+ConfigResource currentNodeResource() {

Review comment:
   No, this method is used to access the private variable 
`currentNodeResource` from outside of the class.




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




[GitHub] [kafka] dielhennr commented on a change in pull request #10463: KAFKA-12670: support unclean.leader.election.enable in KRaft mode

2021-07-20 Thread GitBox


dielhennr commented on a change in pull request #10463:
URL: https://github.com/apache/kafka/pull/10463#discussion_r672693205



##
File path: 
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
##
@@ -42,23 +42,38 @@
 import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Objects;
+import java.util.function.Function;
 
 import static org.apache.kafka.clients.admin.AlterConfigOp.OpType.APPEND;
+import static 
org.apache.kafka.common.config.TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG;
 
 
 public class ConfigurationControlManager {
+static final ConfigResource DEFAULT_NODE_RESOURCE = new 
ConfigResource(Type.BROKER, "");
+
 private final Logger log;
+private final int nodeId;
+private final ConfigResource currentNodeResource;
 private final SnapshotRegistry snapshotRegistry;
 private final Map configDefs;
+private final TimelineHashMap emptyMap;

Review comment:
   I don't think it can be. It needs to be a TimelineHashMap to work and 
needs to receive the snapshot registry in the constructor.




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




[GitHub] [kafka] dielhennr commented on a change in pull request #10463: KAFKA-12670: support unclean.leader.election.enable in KRaft mode

2021-07-20 Thread GitBox


dielhennr commented on a change in pull request #10463:
URL: https://github.com/apache/kafka/pull/10463#discussion_r672693205



##
File path: 
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
##
@@ -42,23 +42,38 @@
 import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Objects;
+import java.util.function.Function;
 
 import static org.apache.kafka.clients.admin.AlterConfigOp.OpType.APPEND;
+import static 
org.apache.kafka.common.config.TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG;
 
 
 public class ConfigurationControlManager {
+static final ConfigResource DEFAULT_NODE_RESOURCE = new 
ConfigResource(Type.BROKER, "");
+
 private final Logger log;
+private final int nodeId;
+private final ConfigResource currentNodeResource;
 private final SnapshotRegistry snapshotRegistry;
 private final Map configDefs;
+private final TimelineHashMap emptyMap;

Review comment:
   I don't think it can be. It needs to be a TimelineHashMap to work and 
needs to receive the snapshot registry in the constructor.




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




[GitHub] [kafka] dielhennr commented on a change in pull request #10463: KAFKA-12670: support unclean.leader.election.enable in KRaft mode

2021-07-19 Thread GitBox


dielhennr commented on a change in pull request #10463:
URL: https://github.com/apache/kafka/pull/10463#discussion_r672693205



##
File path: 
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
##
@@ -42,23 +42,38 @@
 import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Objects;
+import java.util.function.Function;
 
 import static org.apache.kafka.clients.admin.AlterConfigOp.OpType.APPEND;
+import static 
org.apache.kafka.common.config.TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG;
 
 
 public class ConfigurationControlManager {
+static final ConfigResource DEFAULT_NODE_RESOURCE = new 
ConfigResource(Type.BROKER, "");
+
 private final Logger log;
+private final int nodeId;
+private final ConfigResource currentNodeResource;
 private final SnapshotRegistry snapshotRegistry;
 private final Map configDefs;
+private final TimelineHashMap emptyMap;

Review comment:
   I don't think it can be. It needs to be a TimelineHashMap to work and 
needs to receive the snapshot registry in the constructor.




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