> On Feb. 9, 2015, 5:47 p.m., Guozhang Wang wrote: > > core/src/main/scala/kafka/server/ReplicaManager.scala, lines 296-303 > > <https://reviews.apache.org/r/30570/diff/1/?file=846132#file846132line296> > > > > appendToLocalLog can be called for both produce and commit-offset > > requests. And in general I think we might better record the request-level > > metrics on KafkaApis layer intead of the ReplicaManager layer. There are > > some previous work on isolating the request-level information in KafkaApis > > layer.
All the BrokerTopicMetrics reporting happens below KafkaApis i.e. inside the ReplicaManager and Log layer. Since failedProduceRequestRate is being counted in appendToLocalLog, I felt it was more consistent to report totalProduceRequestRate also in the same place. If we do want to report these new stats in KafkaApis, then we should probably change existing metrics reporting as well. bytesInRate, bytesOutRate, failedProduceRequestRate, failedFetchRequestRate etc.. In general it does seem nicer to track these metrics in KafkaApis and I can certainly work on this but IMO it should be tracked separately from this issue. Thoughts? Regarding offset-commit, aren't the new commit-offset requests simply produce requests to a special topic? In that case, it doesn't seem appropriate to do this here. - Aditya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30570/#review71646 ----------------------------------------------------------- On Feb. 3, 2015, 7:13 p.m., Aditya Auradkar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30570/ > ----------------------------------------------------------- > > (Updated Feb. 3, 2015, 7:13 p.m.) > > > Review request for kafka and Joel Koshy. > > > Bugs: KAFKA-1914 > https://issues.apache.org/jira/browse/KAFKA-1914 > > > Repository: kafka > > > Description > ------- > > Fixing KAFKA-1914. Adding metrics to count total number of produce and fetch > metrics > > > Diffs > ----- > > core/src/main/scala/kafka/server/KafkaRequestHandler.scala > e4053fbe8ef78bf8bc39cb3f8ea4c21032613a16 > core/src/main/scala/kafka/server/ReplicaManager.scala > fb948b9ab28c516e81dab14dcbe211dcd99842b6 > core/src/test/scala/unit/kafka/server/SimpleFetchTest.scala > ccf5e2e36260b2484181b81d1b06e81de972674b > > Diff: https://reviews.apache.org/r/30570/diff/ > > > Testing > ------- > > I've added asserts to the SimpleFetchTest to count the number of fetch > requests. I'm going to file an additional jira to add unit tests for all the > BrokerTopicMetrics updated via ReplicaManager > > > Thanks, > > Aditya Auradkar > >