Re: Getting first/last offset of a partition using KafkaConsumer

2016-04-17 Thread Liquan Pei
Hi For the Kafka Consumer, there are seekToBeginning and seekToEnd method that point your the beginning and end of the partition. You can use one of the methods to point the consumer to a certain position and use position(tp) method to get the corresponding position. There is also a seek(tp, offse

Getting first/last offset of a partition using KafkaConsumer

2016-04-17 Thread marko
How does one get the first/last offset for a given partition using the new KafkaConsumer/Producer? In the old SimpleConsumer you would just use the getOffsetsBefore() method. -- Best regards, Marko www.kafkatool.com

Kafka Compile JDK8

2016-04-17 Thread Kyle B
Hello, I'm trying to build Kafka 0.9.0.1 using JDK8, so that it generates JDK8 compatible class files. However, no matter what I try, it seems the class files generated are for JDK6. I've tried setting sourceCompatibility and targetCompatibility to 1.8 to no avail. $ pwd