You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by sohimankotia <so...@gmail.com> on 2017/08/30 14:34:45 UTC

Kafka Offset settings in Flink Kafka Consumer 10

Hi,

I see that Flink Kafka consumer have ability to set specific offset to read
from 

Map<KafkaTopicPartition, Long> specificStartOffsets = new HashMap<>();
specificStartOffsets.put(new KafkaTopicPartition("topic", 0), 23L);
specificStartOffsets.put(new KafkaTopicPartition("topic", 1), 31L);
specificStartOffsets.put(new KafkaTopicPartition("topic", 2), 43L);

FlinkKafkaConsumer08<String> consumer = new FlinkKafkaConsumer08<>(...);
consumer.setStartFromSpecificOffsets(specificStartOffsets);


But there is no methods present in  FlinkKafkaConsumer010 .



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: Kafka Offset settings in Flink Kafka Consumer 10

Posted by sohimankotia <so...@gmail.com>.
My Bad :-) Sorry.

We are using flink 1.2 dependencies  . And I think this functionality is
only available from flink 1.3 API Version .



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: Kafka Offset settings in Flink Kafka Consumer 10

Posted by Oleksandr Baliev <al...@gmail.com>.
Hi,

it's there https://ci.apache.org/projects/flink/flink-docs-
release-1.3/api/java/org/apache/flink/streaming/connectors/kafka/
FlinkKafkaConsumerBase.html#setStartFromSpecificOffsets-java.util.Map-
just defined in FlinkKafkaConsumerBase

2017-08-30 16:34 GMT+02:00 sohimankotia <so...@gmail.com>:

> Hi,
>
> I see that Flink Kafka consumer have ability to set specific offset to read
> from
>
> Map<KafkaTopicPartition, Long> specificStartOffsets = new HashMap<>();
> specificStartOffsets.put(new KafkaTopicPartition("topic", 0), 23L);
> specificStartOffsets.put(new KafkaTopicPartition("topic", 1), 31L);
> specificStartOffsets.put(new KafkaTopicPartition("topic", 2), 43L);
>
> FlinkKafkaConsumer08<String> consumer = new FlinkKafkaConsumer08<>(...);
> consumer.setStartFromSpecificOffsets(specificStartOffsets);
>
>
> But there is no methods present in  FlinkKafkaConsumer010 .
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.
> n4.nabble.com/
>