showuon commented on code in PR #15002:
URL: https://github.com/apache/kafka/pull/15002#discussion_r1426599876
##########
raft/src/main/java/org/apache/kafka/raft/Batch.java:
##########
@@ -120,6 +120,19 @@ public String toString() {
')';
}
+ /**
+ * @return a descriptive short String of the batch.
+ */
+ public String describe() {
+ return "Batch(" +
+ "baseOffset=" + baseOffset +
+ ", epoch=" + epoch +
+ ", appendTimestamp=" + appendTimestamp +
+ ", sizeInBytes=" + sizeInBytes +
+ ", lastOffset=" + lastOffset +
+ ')';
+ }
Review Comment:
> I can remove this method, and print the epoch, offsets, ts and size
"inline" in the String.format
Yes, I think this is better.
--
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]