Re: Re: Measuring Kafka Producer request latency when it is less than 1ms

2015-12-21 Thread Alexey Pirogov
Ismael, thanks for reply.

Jire created https://issues.apache.org/jira/browse/KAFKA-3028.

Thank you,
Alexey


Measuring Kafka Producer request latency when it is less than 1ms

2015-12-21 Thread Alexey Pirogov
I'm looking for help with a question regarding measuring of producer
request latency.
I expected that "producer.request-latency-avg/max" will do a good job for
me. But seems that if latencies less than 1ms in most cases, this metric
will emit NaN(as it doesn't support float values).
We need this metric for monitoring purpose.

Is there any way to producer request latency statistic without adding
callback or blocking of Future from KafkaProducer.send(...) method?

P.S. Technically, we could treat NaN from "producer.request-latency-avg"
metric as a special case in our monitoring tool, but it will required some
specific configuration only for this metric.

Thank you,
Alexey


Re: Re: New Consumer throws GroupCoordinatorNotAvailableException

2015-11-03 Thread Alexey Pirogov
Thanks for reply.

Maybe it will be useful, I've noticed that after I tried to use client 0.9
with server 0.8.2 my data got corrupted. I wasn't able to read data from
existing topics after I switched back to client 0.8.2.
Cleaning kafka's and zk's data folders and creating topic from scratch
solved issue.


Fwd: New Consumer throws GroupCoordinatorNotAvailableException

2015-11-01 Thread Alexey Pirogov
Hi, I'm facing an issue with New Consumer. I'm getting
GroupCoordinatorNotAvailableException during "poll" method:
  12:32:50,942 ERROR ConsumerCoordinator:362 - Auto offset commit failed.
   org.apache.kafka.common.errors.GroupCoordinatorNotAvailableException:
The group coordinator is not available.

Here is the code:

Properties consumerProps = new Properties();
consumerProps.put("bootstrap.servers", "localhost:9092");
consumerProps.put("group.id", "test");
consumerProps.setProperty("key.deserializer",
ByteArrayDeserializer.class.getName());
consumerProps.setProperty("value.deserializer",
ByteArrayDeserializer.class.getName());

consumer = new KafkaConsumer<>(consumerProps);
consumer.subscribe(Collections.singletonList("test-topic"));
Iterator> recordIter =
consumer.poll(1).iterator();


I've build kafka-clients.jar from master two days ago.
I'm using local server kafka_2.10-0.8.2.1. Is this ok or should I build new
server also?
Local server works well with client 0.8.2.2 and old consumer.

Thanks,
Alexey