> On July 23, 2015, 5:56 p.m., Aditya Auradkar wrote:
> > core/src/main/scala/kafka/consumer/SimpleConsumer.scala, line 138
> > <https://reviews.apache.org/r/36722/diff/1/?file=1019436#file1019436line138>
> >
> >     same comment about null

fetchRequestAndResponseStats.getFetchRequestAndResponseStats(host, port) will 
not be null. Becuase it is null, then the existing code, 
fetchRequestAndResponseStats.getFetchRequestAndResponseAllBrokersStats.requestSizeHist.update(fetchedSize),
 will already throw exception.


> On July 23, 2015, 5:56 p.m., Aditya Auradkar wrote:
> > core/src/main/scala/kafka/producer/SyncProducer.scala, line 109
> > <https://reviews.apache.org/r/36722/diff/1/?file=1019438#file1019438line109>
> >
> >     can the getProducerStats().throttleTimeHist be null?

This can not be null. Otherwise, the existing code that is executed before my 
added code, producerRequestStats.getProducerRequestStats(config.host, 
config.port).requestSizeHist.update(requestSize), will be problematic.


On July 23, 2015, 5:56 p.m., Dong Lin wrote:
> > What if we simply duplicate the sensors we are adding in 2136 for the new 
> > producer and consumer?

Hi Adi, thanks for your comments!

The sensors added for new producer and consumer are implemented as java classes 
in org.apache.kafka.common, wherease the older producer and consumer uses 
sensors implmeneted in scala in package kafka.metrics. I worry it will cause 
problem for compilation and code readability if I mix the java-version sensor 
with scala-version sensor in the old consumer and producer. Does this answer 
your question?


- Dong


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36722/#review92778
-----------------------------------------------------------


On July 23, 2015, 7:12 a.m., Dong Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36722/
> -----------------------------------------------------------
> 
> (Updated July 23, 2015, 7:12 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2332
>     https://issues.apache.org/jira/browse/KAFKA-2332
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-2332; Add quota metrics to old producer and consumer
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/consumer/FetchRequestAndResponseStats.scala 
> 3df55e13001cef31ee662cc713b99baf8ab4ce0f 
>   core/src/main/scala/kafka/consumer/SimpleConsumer.scala 
> 7ebc0405d1f309bed9943e7116051d1d8276f200 
>   core/src/main/scala/kafka/producer/ProducerRequestStats.scala 
> 026e93a2f1dcc0e6380fad509dc98b0cc6469a7a 
>   core/src/main/scala/kafka/producer/SyncProducer.scala 
> dcee50113b1b1e062a56ab0f63ac6bb175be6b75 
> 
> Diff: https://reviews.apache.org/r/36722/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dong Lin
> 
>

Reply via email to