Re: compression-rate-avg returns 0 with compression enabled

2015-12-15 Thread tao xiao
created https://issues.apache.org/jira/browse/KAFKA-2993. I will submit a patch for this On Wed, 16 Dec 2015 at 00:53 Ismael Juma wrote: > Yes, please. > > Ismael > On 15 Dec 2015 11:52, "tao xiao" wrote: > > > Hi team, > > > > I found that the producer metric compression-rate-avg always return

Re: compression-rate-avg returns 0 with compression enabled

2015-12-15 Thread Ismael Juma
Yes, please. Ismael On 15 Dec 2015 11:52, "tao xiao" wrote: > Hi team, > > I found that the producer metric compression-rate-avg always returns 0 even > with compression.type set to snappy. I drilled down the code and discovered > that the position of bytebuffer in > org.apache.kafka.common.reco

compression-rate-avg returns 0 with compression enabled

2015-12-15 Thread tao xiao
Hi team, I found that the producer metric compression-rate-avg always returns 0 even with compression.type set to snappy. I drilled down the code and discovered that the position of bytebuffer in org.apache.kafka.common.record.Compressor is reset to 0 by RecordAccumulator.drain() before calling me