MINOR: Move transaction coordinator leaf classes from Scala to Java#22576
Open
sjhajharia wants to merge 2 commits into
Open
MINOR: Move transaction coordinator leaf classes from Scala to Java#22576sjhajharia wants to merge 2 commits into
sjhajharia wants to merge 2 commits into
Conversation
chia7712
reviewed
Jun 15, 2026
| TxnTransitMetadata newMetadata | ||
| ) { | ||
|
|
||
| @Override |
Member
There was a problem hiding this comment.
What do you think about relying on the auto-generated code?
Collaborator
Author
There was a problem hiding this comment.
Yes we can get rid of it I think. Done!
|
|
||
| public void forEachTxnTopicPartition(BiConsumer<Integer, BlockingQueue<PendingCompleteTxnAndMarkerEntry>> f) { | ||
| markersPerTxnTopicPartition.forEach((partition, queue) -> { | ||
| if (!queue.isEmpty()) { |
Member
There was a problem hiding this comment.
I'm not sure why we need this check. It seems we can safely remove it without letting the smoke out
Collaborator
Author
There was a problem hiding this comment.
Even I was considering the same, but wanted to ensure with a second eye. Done the change.
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.
Description
As part of the ongoing effort to migrate
kafka.coordinator.transactionfrom Scala (core) to Java (the transaction-coordinator module), this PR
moves the self-contained "leaf" classes - pure data holders and a
stateful helper with no ReplicaManager/KafkaConfig coupling. These can
move independently while the remaining Scala classes continue to compile
against them, since core depends on transaction-coordinator.
Changes
custom toString to preserve the original log output format.
SLF4J, Scala getOrElseUpdate → computeIfAbsent, and Option → Optional on
the public API.
Reviewers: Chia-Ping Tsai chia7712@gmail.com