You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/10/20 20:20:33 UTC

[GitHub] [kafka] ijuma commented on a change in pull request #9292: KAFKA-8238: adding number of messages/bytes read

ijuma commented on a change in pull request #9292:
URL: https://github.com/apache/kafka/pull/9292#discussion_r508812929



##########
File path: core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala
##########
@@ -670,12 +675,16 @@ class GroupMetadataManager(brokerId: Int,
                   case unknownKey =>
                     throw new IllegalStateException(s"Unexpected message key $unknownKey while loading offsets and group metadata")
                 }
+                messagesRead += 1
+                bytesRead += record.sizeInBytes()
               }
             }
+            batchesRead += 1
             currOffset = batch.nextOffset
           }
         }
 
+        info(s"Number of messages/bytes/batches read: $messagesRead/$bytesRead/$batchesRead for partition $topicPartition")

Review comment:
       Will this be too noisy if there are lots of partitions? Do we want to have the log output be for all partitions instead?




----------------------------------------------------------------
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.

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