sjhajharia opened a new pull request, #22334:
URL: https://github.com/apache/kafka/pull/22334
### Summary
As part of the larger effort to move `TransactionStateManager` from core to
the `transaction-coordinator` module and convert it to Java, this PR extracts
the 7 leaf data classes that lived inside `TransactionStateManager.scala` and
reimplements them as Java records in
`org.apache.kafka.coordinator.transaction`. They have no coupling to the
manager itself and can move independently.
### Changes
New Java records in transaction-coordinator:
- TransactionPartitionAndLeaderEpoch
- TransactionalIdAndProducerIdEpoch : custom toString preserved (used in log
messages)
- CoordinatorEpochAndTxnMetadata
- TransactionalIdCoordinatorEpochAndMetadata
- TransactionalIdCoordinatorEpochAndTransitMetadata
- TxnMetadataCacheEntry : custom toString preserved (coordinatorEpoch=X,
numTransactionalEntries=Y)
- TransactionConfig : declares a no-arg constructor that delegates to the
canonical 11-arg constructor with the same `*_DEFAULT` constants the old Scala
defaults referenced, preserving the TransactionConfig() test ergonomics
Removed from TransactionStateManager.scala: all 7 case class definitions;
unused ServerConfigs import.
#### Call-site updates:
- TransactionStateManager.scala, TransactionCoordinator.scala : added
imports, prepended new to record construction.
- 5 test files: TransactionStateManagerTest, TransactionCoordinatorTest,
TransactionCoordinatorConcurrencyTest,
TransactionMarkerRequestCompletionHandlerTest,
TransactionMarkerChannelManagerTest : same treatment.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]