OmniaGM commented on code in PR #24129:
URL: https://github.com/apache/kafka/pull/24129#discussion_r4588880895
##########
tools/src/main/java/org/apache/kafka/tools/consumer/MirrorStateMessageFormatter.java:
##########
@@ -47,8 +47,8 @@ protected JsonNode keyAsJson(ApiMessage message) {
protected JsonNode valueAsJson(ApiMessage message, short version) {
JsonNode json =
CoordinatorRecordJsonConverters.writeRecordValueAsJson(message, version);
if (message instanceof MirrorPartitionStateValue state) {
- ((ObjectNode) json).put("state",
MirrorPartitionState.nameOf(state.state()));
- ((ObjectNode) json).put("previousState",
MirrorPartitionState.nameOf(state.previousState()));
+ ((ObjectNode) json).put("stateName",
MirrorPartitionState.nameOf(state.state()));
Review Comment:
Small one: the formatter example in the KIP still shows only the numeric
`state`/`previousState `(and key "type":1, while `MirrorPartitionStateKey` is
apiKey 0), so it's worth updating it with the new
`stateName`/`previousStateName` fields. I can update it if you want.
--
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]