> On April 16, 2015, 5:29 p.m., Ewen Cheslack-Postava wrote:
> > clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java, 
> > line 531
> > <https://reviews.apache.org/r/33242/diff/2/?file=931792#file931792line531>
> >
> >     This code is all single threaded, is the AtomicReference really 
> > necessary here?

not really necessary. just trying to use the compareAndSet. otherwise, I need 
to do "if(firstException == null) firstException = t". I can certainly change 
it. let me know.


> On April 16, 2015, 5:29 p.m., Ewen Cheslack-Postava wrote:
> > clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java, 
> > line 548
> > <https://reviews.apache.org/r/33242/diff/2/?file=931792#file931792line548>
> >
> >     One idea for making this less verbose and redundant: make all of these 
> > classes implement Closeable so we can just write one utility method for 
> > trying to close something and catching the exception.

yes. I thought about it. it may break binary compatibility, e.g. Serializer. 
Sender and Metrics classes are probably only used internally. let me know your 
thoughts.


- Steven


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


On April 16, 2015, 5:44 p.m., Steven Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33242/
> -----------------------------------------------------------
> 
> (Updated April 16, 2015, 5:44 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2121
>     https://issues.apache.org/jira/browse/KAFKA-2121
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> add a unit test file
> 
> 
> changes based on Ewen's review feedbacks
> 
> 
> fix capitalization in error log
> 
> 
> Diffs
> -----
> 
>   clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java 
> b91e2c52ed0acb1faa85915097d97bafa28c413a 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33242/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Steven Wu
> 
>

Reply via email to