fvaleri commented on code in PR #22615:
URL: https://github.com/apache/kafka/pull/22615#discussion_r3504318314


##########
tools/src/main/java/org/apache/kafka/tools/DumpLogSegments.java:
##########
@@ -725,8 +727,13 @@ protected JsonNode keyAsJson(ApiMessage message) {
 
         @Override
         protected JsonNode valueAsJson(ApiMessage message, short version) {
-            return 
org.apache.kafka.coordinator.transaction.generated.CoordinatorRecordJsonConverters
+            JsonNode json = 
org.apache.kafka.coordinator.transaction.generated.CoordinatorRecordJsonConverters
                 .writeRecordValueAsJson(message, version);
+            if (message instanceof TransactionLogValue) {
+                ((ObjectNode) json).put("transactionStatus",
+                    TransactionState.fromId(((TransactionLogValue) 
message).transactionStatus()).stateName());

Review Comment:
   @chia7712 I would say that we can catch the exception and fall back to the 
numeric value. This is what I do in my latest commit. Let me know if it's fine 
or you had something different in mind. 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to