> On July 7, 2015, 12:25 a.m., Guozhang Wang wrote: > > clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java, > > line 254 > > <https://reviews.apache.org/r/36034/diff/2/?file=1000578#file1000578line254> > > > > I think we do not need to create a varialbe here since it is only > > referenced once in the code. Instead we could just call the following in > > line 410: > > > > metrics.sensor("...").record();
Sure. Will fix it. > On July 7, 2015, 12:25 a.m., Guozhang Wang wrote: > > clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java, > > lines 399-402 > > <https://reviews.apache.org/r/36034/diff/2/?file=1000579#file1000579line399> > > > > This metric may better be added in RecordAccumulator's > > registerMetrics() rather than in Sender. Also, the naming convention is not > > aligned with others, would better be "buffer-exhausted-rate". Sure. I also removed per-topic BufferExhaustedException metric since BufferExhaustedException is irrelevant to specific topic. Thanks! - Dong ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36034/#review90614 ----------------------------------------------------------- On July 6, 2015, 9:54 p.m., Dong Lin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36034/ > ----------------------------------------------------------- > > (Updated July 6, 2015, 9:54 p.m.) > > > Review request for kafka and Joel Koshy. > > > Bugs: KAFKA-2306 > https://issues.apache.org/jira/browse/KAFKA-2306 > > > Repository: kafka > > > Description > ------- > > KAFKA-2306; New producer should emit metrics for buffer exhaustion > > > Diffs > ----- > > clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java > 5671a3fbeea8cb9a9ffeeb41aa1b132b92c0cae8 > > clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java > 0baf16e55046a2f49f6431e01d52c323c95eddf0 > > Diff: https://reviews.apache.org/r/36034/diff/ > > > Testing > ------- > > > Thanks, > > Dong Lin > >