[GitHub] [kafka] chia7712 commented on a change in pull request #9102: KAFKA-10326 Both serializer and deserializer should be able to see th…
chia7712 commented on a change in pull request #9102: URL: https://github.com/apache/kafka/pull/9102#discussion_r463930430 ## File path: clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java ## @@ -228,6 +228,13 @@ public Password getPassword(String key) { return copy; } +public Map originals(Map configOverrides) { Review comment: Will copy that 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #9102: KAFKA-10326 Both serializer and deserializer should be able to see th…
chia7712 commented on a change in pull request #9102: URL: https://github.com/apache/kafka/pull/9102#discussion_r464216698 ## File path: clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java ## @@ -228,6 +228,13 @@ public Password getPassword(String key) { return copy; } +public Map originals(Map configOverrides) { Review comment: I have updated the method name. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #9102: KAFKA-10326 Both serializer and deserializer should be able to see th…
chia7712 commented on a change in pull request #9102: URL: https://github.com/apache/kafka/pull/9102#discussion_r466092016 ## File path: clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java ## @@ -2511,4 +2511,39 @@ public void testEnforceRebalanceTriggersRebalanceOnNextPoll() { assertEquals(countingRebalanceListener.revokedCount, 1); } + +@Test +public void deserializerShouldSeeGeneratedConfigs() { +Properties props = new Properties(); +props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:"); +props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, DeserializerForClientId.class.getName()); +props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, DeserializerForClientId.class.getName()); + +KafkaConsumer consumer = new KafkaConsumer<>(props); + +assertEquals(2, DeserializerForClientId.CLIENT_IDS.size()); +assertEquals(DeserializerForClientId.CLIENT_IDS.get(0), consumer.getClientId()); +assertEquals(DeserializerForClientId.CLIENT_IDS.get(1), consumer.getClientId()); + +assertEquals(2, DeserializerForClientId.AUTO_COMMIT_FLAGS.size()); +assertEquals(DeserializerForClientId.AUTO_COMMIT_FLAGS.get(0), consumer.isAutoCommitEnabled()); Review comment: This flag is included by reason of this comment https://github.com/apache/kafka/pull/9102#issuecomment-667734629 I’m ok to revert it if it is overkill 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #9102: KAFKA-10326 Both serializer and deserializer should be able to see th…
chia7712 commented on a change in pull request #9102: URL: https://github.com/apache/kafka/pull/9102#discussion_r475041700 ## File path: clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java ## @@ -2511,4 +2511,39 @@ public void testEnforceRebalanceTriggersRebalanceOnNextPoll() { assertEquals(countingRebalanceListener.revokedCount, 1); } + +@Test +public void deserializerShouldSeeGeneratedConfigs() { +Properties props = new Properties(); +props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:"); +props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, DeserializerForClientId.class.getName()); +props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, DeserializerForClientId.class.getName()); + +KafkaConsumer consumer = new KafkaConsumer<>(props); + +assertEquals(2, DeserializerForClientId.CLIENT_IDS.size()); +assertEquals(DeserializerForClientId.CLIENT_IDS.get(0), consumer.getClientId()); +assertEquals(DeserializerForClientId.CLIENT_IDS.get(1), consumer.getClientId()); + +assertEquals(2, DeserializerForClientId.AUTO_COMMIT_FLAGS.size()); +assertEquals(DeserializerForClientId.AUTO_COMMIT_FLAGS.get(0), consumer.isAutoCommitEnabled()); Review comment: @abbccdda thanks for suggestion. I have reverted 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org