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


Another thing I forgot to mention in the earlier review: we definitely should 
have a unit test for this. You will need to allow passing in the Time interface 
and use MockTime in the test.


core/src/main/scala/kafka/utils/ByteBoundedBlockingQueue.scala
<https://reviews.apache.org/r/26755/#comment99850>

    Unused



core/src/main/scala/kafka/utils/ByteBoundedBlockingQueue.scala
<https://reviews.apache.org/r/26755/#comment99860>

    if



core/src/main/scala/kafka/utils/ByteBoundedBlockingQueue.scala
<https://reviews.apache.org/r/26755/#comment99864>

    no need the return
    you can add on line 63:
    else {
      false
    }
    
    (and remove the false at the very end)
    
    Equivalent, but a little cleaner to look at



core/src/main/scala/kafka/utils/ByteBoundedBlockingQueue.scala
<https://reviews.apache.org/r/26755/#comment99865>

    Again, this is obviously stylistic, but in small methods like this there is 
little need to return from the middle.
    
    Can you restructure it to something like:
    
    if (...)
      false
    else {
      ...
      success
    }



core/src/main/scala/kafka/utils/ByteBoundedBlockingQueue.scala
<https://reviews.apache.org/r/26755/#comment99866>

    Same here


- Joel Koshy


On Oct. 27, 2014, 6:50 a.m., Jiangjie Qin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26755/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2014, 6:50 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1706
>     https://issues.apache.org/jira/browse/KAFKA-1706
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> changed arguments name
> 
> 
> correct typo.
> 
> 
> Incorporated Joel's comments. Also fixed negative queue size problem.
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/utils/ByteBoundedBlockingQueue.scala PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/26755/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jiangjie Qin
> 
>

Reply via email to