You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "kirktrue (via GitHub)" <gi...@apache.org> on 2024/07/24 20:10:14 UTC

[PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

kirktrue opened a new pull request, #16683:
URL: https://github.com/apache/kafka/pull/16683

   Rename `LegacyKafkaConsumer` to `ClassicKafkaConsumer` to avoid confusion.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #16683:
URL: https://github.com/apache/kafka/pull/16683#discussion_r1693677875


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -146,7 +146,7 @@ public class LegacyKafkaConsumer<K, V> implements ConsumerDelegate<K, V> {
     // to keep from repeatedly scanning subscriptions in poll(), cache the result during metadata updates
     private boolean cachedSubscriptionHasAllFetchPositions;
 
-    LegacyKafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, Deserializer<V> valueDeserializer) {
+    ClassicKafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, Deserializer<V> valueDeserializer) {

Review Comment:
   I _believe_ I've found all of the occurrences of `LegacyKafkaConsumer` in code, comments, etc.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -107,7 +107,7 @@
  * group protocol (from KIP-848) introduces allows users continue using the legacy "classic" group protocol.

Review Comment:
   Updated. Thanks!



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #16683:
URL: https://github.com/apache/kafka/pull/16683#issuecomment-2249670325

   The failure will be fixed by #16688


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #16683:
URL: https://github.com/apache/kafka/pull/16683#discussion_r1692018116


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -103,11 +103,15 @@
  *
  * <p/>
  *
- * <em>Note:</em> per its name, this implementation is left for backward compatibility purposes. The updated consumer
- * group protocol (from KIP-848) introduces allows users continue using the legacy "classic" group protocol.
- * This class should not be invoked directly; users should instead create a {@link KafkaConsumer} as before.
+ * This {@link ConsumerDelegate} implementation exists for backward compatibility to allow users to continue to use
+ * the existing classic group protocol.

Review Comment:
   I think "existing" is redundant here. I suggest "classic group protocol (pre-KIP 848)".



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #16683:
URL: https://github.com/apache/kafka/pull/16683


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #16683:
URL: https://github.com/apache/kafka/pull/16683#discussion_r1690469894


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -146,7 +146,7 @@ public class LegacyKafkaConsumer<K, V> implements ConsumerDelegate<K, V> {
     // to keep from repeatedly scanning subscriptions in poll(), cache the result during metadata updates
     private boolean cachedSubscriptionHasAllFetchPositions;
 
-    LegacyKafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, Deserializer<V> valueDeserializer) {
+    ClassicKafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, Deserializer<V> valueDeserializer) {

Review Comment:
   Good call! I'll look for more text matches.



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #16683:
URL: https://github.com/apache/kafka/pull/16683#discussion_r1693678048


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -103,11 +103,15 @@
  *
  * <p/>
  *
- * <em>Note:</em> per its name, this implementation is left for backward compatibility purposes. The updated consumer
- * group protocol (from KIP-848) introduces allows users continue using the legacy "classic" group protocol.
- * This class should not be invoked directly; users should instead create a {@link KafkaConsumer} as before.
+ * This {@link ConsumerDelegate} implementation exists for backward compatibility to allow users to continue to use
+ * the existing classic group protocol.

Review Comment:
   Fixed, as suggested. Thanks!



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on code in PR #16683:
URL: https://github.com/apache/kafka/pull/16683#discussion_r1690482809


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -107,7 +107,7 @@
  * group protocol (from KIP-848) introduces allows users continue using the legacy "classic" group protocol.

Review Comment:
   nit: introduces allow...not introduced here but makes sense to review the javadoc after the rename



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on PR #16683:
URL: https://github.com/apache/kafka/pull/16683#issuecomment-2248947577

   Hey @kirktrue , thanks for the patch, nice! Just minor comments. 


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #16683:
URL: https://github.com/apache/kafka/pull/16683#issuecomment-2250035455

   @kirktrue Could you please merge trunk to include fix #16688? I feel this patch is good but it would be nice to see CI again :)


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17060: Rename LegacyKafkaConsumer to ClassicKafkaConsumer [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on code in PR #16683:
URL: https://github.com/apache/kafka/pull/16683#discussion_r1690468383


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -146,7 +146,7 @@ public class LegacyKafkaConsumer<K, V> implements ConsumerDelegate<K, V> {
     // to keep from repeatedly scanning subscriptions in poll(), cache the result during metadata updates
     private boolean cachedSubscriptionHasAllFetchPositions;
 
-    LegacyKafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, Deserializer<V> valueDeserializer) {
+    ClassicKafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, Deserializer<V> valueDeserializer) {

Review Comment:
   we should also remove the reference to LegacyKafkaConsumer right above, on ln 140



-- 
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-unsubscribe@kafka.apache.org

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