satishd commented on code in PR #13362:
URL: https://github.com/apache/kafka/pull/13362#discussion_r1140880048


##########
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/serialization/RemoteLogMetadataSerde.java:
##########
@@ -107,4 +110,13 @@ private RemoteLogMetadataTransform 
remoteLogMetadataTransform(short apiKey) {
 
         return metadataTransform;
     }
+
+    public static class RemoteLogMetadataFormatter implements MessageFormatter 
{
+        private final RemoteLogMetadataSerde remoteLogMetadataSerde = new 
RemoteLogMetadataSerde();
+
+        @Override
+        public void writeTo(ConsumerRecord<byte[], byte[]> consumerRecord, 
PrintStream output) {
+            
output.println(remoteLogMetadataSerde.deserialize(consumerRecord.value()).toString());

Review Comment:
   It is good to include offset and partition, which will be helpful for 
debugging.
   
   ```
   output.printf("offset: %d, partition: %d, value: %s%n", record.offset(), 
record.partition(), 
remoteLogMetadataSerde.deserialize(consumerRecord.value()).toString());
   ```



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to