> On June 10, 2014, 11:35 p.m., Joel Koshy wrote:
> > clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java,
> >  line 132
> > <https://reviews.apache.org/r/22446/diff/1/?file=606866#file606866line132>
> >
> >     Do we really need super-fine granularity here? i.e., we wouldn't expect 
> > the buffer pool to be full for a long period - i.e., probably not as long 
> > as sampling intervals for graphing systems. So we can just measure the time 
> > for the original (full) await() no?

Well, the argument is that if the client waits on buffer allocation, it's not 
clear how long it will be blocked for. So, using await() up to a certain amount 
of time will make sure the metrics is always accurate.

This shouldn't affect the normal performance since in the normal case, the 
producer shouldn't block.


- Jun


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


On June 10, 2014, 11:15 p.m., Jun Rao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22446/
> -----------------------------------------------------------
> 
> (Updated June 10, 2014, 11:15 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1488
>     https://issues.apache.org/jira/browse/KAFKA-1488
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> Add a new metric for measuring the ratio when the new producer is block for 
> space allocation.
> 
> 
> Diffs
> -----
> 
>   
> clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java
>  d1d6c4bba10384d0b38f057e74242e2ce44aafad 
>   
> clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java
>  5ededccef7cb8e161822e9e5fc25e70a51dbe581 
>   clients/src/test/java/org/apache/kafka/clients/producer/BufferPoolTest.java 
> f227b5c3ff365e30384eda51bd0c3f21ef14a8a4 
> 
> Diff: https://reviews.apache.org/r/22446/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jun Rao
> 
>

Reply via email to