You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Be...@Dev.Helaba.de on 2018/10/31 09:13:34 UTC

Kafka offset behaviour when restarting job from savepoint

Hi
Let's say we have a job which reads from a Flink kafka source (FlinkKafkaConsumer011) and commits the offsets on each checkpoint.
When the job is started from an older savepoint, will it take the latest offsets stored in Kafka  for the consumer group or are the offsets taken from the savepoint?

Regards

Bernd



  ________________________________


Landesbank Hessen-Thueringen Girozentrale
Anstalt des oeffentlichen Rechts
Sitz: Frankfurt am Main / Erfurt
Amtsgericht Frankfurt am Main, HRA 29821 / Amtsgericht Jena, HRA 102181

Bitte nutzen Sie die E-Mail-Verbindung mit uns ausschliesslich zum Informationsaustausch. Wir koennen auf diesem Wege keine rechtsgeschaeftlichen Erklaerungen (Auftraege etc.) entgegennehmen.

Der Inhalt dieser Nachricht ist vertraulich und nur fuer den angegebenen Empfaenger bestimmt. Jede Form der Kenntnisnahme oder Weitergabe durch Dritte ist unzulaessig. Sollte diese Nachricht nicht fur Sie bestimmt sein, so bitten wir Sie, sich mit uns per E-Mail oder telefonisch in Verbindung zu setzen.

Please use your E-mail connection with us exclusively for the exchange of information. We do not accept legally binding declarations (orders, etc.) by this means of communication.

The contents of this message is confidential and intended only for the recipient indicated. Taking notice of this message or disclosure by third parties is not
permitted. In the event that this message is not intended for you, please contact us via E-mail or phone.

Re: Kafka offset behaviour when restarting job from savepoint

Posted by Paul Lam <pa...@gmail.com>.
Hi Anil,

Sure. You could have a look at FlinkKafkaConsumerBase.java.

Best,
Paul Lam

> 在 2018年11月1日,03:37,Anil <an...@gmail.com> 写道:
> 
> Hey Paul. Can you please point me to the code in Flink. Thanks!
> 
> 
> 
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Re: Kafka offset behaviour when restarting job from savepoint

Posted by Anil <an...@gmail.com>.
Hey Paul. Can you please point me to the code in Flink. Thanks!



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

Re: Kafka offset behaviour when restarting job from savepoint

Posted by Paul Lam <pa...@gmail.com>.
Hi Bend,

The offsets would be restored from the savepoint. Flink would only fallback to use the offsets on the brokers if there are no offset in its states.

Best,
Paul Lam



> 在 2018年10月31日,17:13,<Be...@Dev.Helaba.de> <Be...@Dev.Helaba.de> 写道:
> 
> Hi
> Let’s say we have a job which reads from a Flink kafka source (FlinkKafkaConsumer011) and commits the offsets on each checkpoint.
> When the job is started from an older savepoint, will it take the latest offsets stored in Kafka  for the consumer group or are the offsets taken from the savepoint?
>  
> Regards
>  
> Bernd
>  
> 
>   ________________________________  
> 
> 
> Landesbank Hessen-Thueringen Girozentrale
> Anstalt des oeffentlichen Rechts
> Sitz: Frankfurt am Main / Erfurt
> Amtsgericht Frankfurt am Main, HRA 29821 / Amtsgericht Jena, HRA 102181
> 
> Bitte nutzen Sie die E-Mail-Verbindung mit uns ausschliesslich zum Informationsaustausch. Wir koennen auf diesem Wege keine rechtsgeschaeftlichen Erklaerungen (Auftraege etc.) entgegennehmen.
> 
> Der Inhalt dieser Nachricht ist vertraulich und nur fuer den angegebenen Empfaenger bestimmt. Jede Form der Kenntnisnahme oder Weitergabe durch Dritte ist unzulaessig. Sollte diese Nachricht nicht fur Sie bestimmt sein, so bitten wir Sie, sich mit uns per E-Mail oder telefonisch in Verbindung zu setzen.
> 
> Please use your E-mail connection with us exclusively for the exchange of information. We do not accept legally binding declarations (orders, etc.) by this means of communication.
> 
> The contents of this message is confidential and intended only for the recipient indicated. Taking notice of this message or disclosure by third parties is not
> permitted. In the event that this message is not intended for you, please contact us via E-mail or phone.