MINOR: Remove topic null check from TopicIdPartition and adjust constructor order#11403
Merged
ijuma merged 2 commits intoapache:trunkfrom Nov 10, 2021
Merged
MINOR: Remove topic null check from TopicIdPartition and adjust constructor order#11403ijuma merged 2 commits intoapache:trunkfrom
TopicIdPartition and adjust constructor order#11403ijuma merged 2 commits intoapache:trunkfrom
Conversation
…structor order `TopicPartition` allows a null `topic` and there are cases where we have a topic id, but no topic name. Even for `TopicIdPartition`, the non null topic name check was only enforced in one constructor. Also adjust the constructor order to move the nullable parameter to the end, update tests and javadoc.
Member
Author
|
cc @jolshan |
showuon
reviewed
Oct 18, 2021
Member
showuon
left a comment
There was a problem hiding this comment.
LGTM. Left a minor comment. Thanks.
|
|
||
| /** | ||
| * @return the topic name. | ||
| * @return the topic name or null. |
Member
There was a problem hiding this comment.
I think we should add more explanation for null return value:
ex: @return the topic name or null if there's only topic ID set.
Member
Author
There was a problem hiding this comment.
Not sure if that adds any value. The topic id is always set, so how is saying "there's only topic id set" helping? Maybe "the topic name or null if it is unknown"?
Member
There was a problem hiding this comment.
You're right. "the topic name or null if it is unknown" is what I meant.
Member
|
@ijuma Could we merge this PR? |
3 tasks
Member
Author
|
@dajac I'll merge after the build completes. |
Member
|
Thanks @ijuma. Could you also cherry-pick to 3.1 branch? |
ijuma
added a commit
that referenced
this pull request
Nov 10, 2021
…structor order (#11403) `TopicPartition` allows a null `topic` and there are cases where we have a topic id, but no topic name. Even for `TopicIdPartition`, the non null topic name check was only enforced in one constructor. Also adjust the constructor order to move the nullable parameter to the end, update tests and javadoc. Reviewers: David Jacot <djacot@confluent.io>, Luke Chen <showuon@gmail.com>
Member
Author
|
Merged to trunk and 3.1 branches. |
stanislavkozlovski
added a commit
to stanislavkozlovski/kafka
that referenced
this pull request
Nov 11, 2021
…ntegration-11-nov * ak/trunk: (15 commits) KAFKA-13429: ignore bin on new modules (apache#11415) KAFKA-12648: introduce TopologyConfig and TaskConfig for topology-level overrides (apache#11272) KAFKA-12487: Add support for cooperative consumer protocol with sink connectors (apache#10563) MINOR: Log client disconnect events at INFO level (apache#11449) MINOR: Remove topic null check from `TopicIdPartition` and adjust constructor order (apache#11403) KAFKA-13417; Ensure dynamic reconfigurations set old config properly (apache#11448) MINOR: Adding a constant to denote UNKNOWN leader in LeaderAndEpoch (apache#11477) KAFKA-10543: Convert KTable joins to new PAPI (apache#11412) KAFKA-12226: Commit source task offsets without blocking on batch delivery (apache#11323) KAFKA-13396: Allow create topic without partition/replicaFactor (apache#11429) ...
xdgrulez
pushed a commit
to xdgrulez/kafka
that referenced
this pull request
Dec 22, 2021
…structor order (apache#11403) `TopicPartition` allows a null `topic` and there are cases where we have a topic id, but no topic name. Even for `TopicIdPartition`, the non null topic name check was only enforced in one constructor. Also adjust the constructor order to move the nullable parameter to the end, update tests and javadoc. Reviewers: David Jacot <djacot@confluent.io>, Luke Chen <showuon@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TopicPartitionallows a nulltopicand there are cases where we havea topic id, but no topic name. Even for
TopicIdPartition, the non nulltopic name check was only enforced in one constructor.
Also adjust the constructor order to move the nullable parameter to the
end, update tests and javadoc.
Committer Checklist (excluded from commit message)