> On Oct. 21, 2014, 10:53 p.m., Gwen Shapira wrote:
> > flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannel.java,
> >  lines 240-251
> > <https://reviews.apache.org/r/26820/diff/1/?file=723287#file723287line240>
> >
> >     Wouldn't it be cleaner to instantiate in the constructor? Even if we 
> > never do puts, the overhead is fairly minimal?

It would be cleaner, but remember this is per transaction -- each transaction 
is short-lived, so it would create a large number of unused objects - which can 
be avoided by slightly messy code.


> On Oct. 21, 2014, 10:53 p.m., Gwen Shapira wrote:
> > flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannel.java,
> >  lines 270-273
> > <https://reviews.apache.org/r/26820/diff/1/?file=723287#file723287line270>
> >
> >     Shouldn't we create a new consumer here too?

We don't need to. The remove() method will remove the thread-local, and the 
next get() call will end up calling initialValue, which will, in turn, create 
the new consumer.


> On Oct. 21, 2014, 10:53 p.m., Gwen Shapira wrote:
> > flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannel.java,
> >  line 276
> > <https://reviews.apache.org/r/26820/diff/1/?file=723287#file723287line276>
> >
> >     LOL

The thinnest, most lightweight error message yet.


> On Oct. 21, 2014, 10:53 p.m., Gwen Shapira wrote:
> > flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannel.java,
> >  lines 278-280
> > <https://reviews.apache.org/r/26820/diff/1/?file=723287#file723287line278>
> >
> >     Constructor?

Same as above, avoid gc overhead.


- Hari


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


On Oct. 16, 2014, 8:22 p.m., Hari Shreedharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26820/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2014, 8:22 p.m.)
> 
> 
> Review request for Flume.
> 
> 
> Bugs: FLUME-2500
>     https://issues.apache.org/jira/browse/FLUME-2500
> 
> 
> Repository: flume-git
> 
> 
> Description
> -------
> 
> Add a channel that uses Kafka
> 
> 
> Diffs
> -----
> 
>   flume-ng-channels/flume-kafka-channel/pom.xml PRE-CREATION 
>   
> flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannel.java
>  PRE-CREATION 
>   
> flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannelConfiguration.java
>  PRE-CREATION 
>   
> flume-ng-channels/flume-kafka-channel/src/test/java/org/apache/flume/channel/kafka/TestKafkaChannel.java
>  PRE-CREATION 
>   
> flume-ng-channels/flume-kafka-channel/src/test/resources/kafka-server.properties
>  PRE-CREATION 
>   flume-ng-channels/flume-kafka-channel/src/test/resources/log4j.properties 
> PRE-CREATION 
>   
> flume-ng-channels/flume-kafka-channel/src/test/resources/zookeeper.properties 
> PRE-CREATION 
>   flume-ng-channels/pom.xml dc8dbc6 
>   flume-ng-sinks/flume-ng-kafka-sink/pom.xml 746a395 
>   
> flume-ng-sinks/flume-ng-kafka-sink/src/test/java/org/apache/flume/sink/kafka/util/KafkaConsumer.java
>  1c98922 
>   
> flume-ng-sinks/flume-ng-kafka-sink/src/test/java/org/apache/flume/sink/kafka/util/TestUtil.java
>  8855c53 
>   pom.xml 4f550d3 
> 
> Diff: https://reviews.apache.org/r/26820/diff/
> 
> 
> Testing
> -------
> 
> Added tests that simulate a Kafka cluster.
> 
> 
> Thanks,
> 
> Hari Shreedharan
> 
>

Reply via email to