Quantcast

How to gracefully handle Kafka OffsetOutOfRangeException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to gracefully handle Kafka OffsetOutOfRangeException

Ramkumar Venkataraman
This post has NOT been accepted by the mailing list yet.
I am using Spark streaming and reading data from Kafka using KafkaUtils.createDirectStream. I have the "auto.offset.reset" set to smallest.

But in some Kafka partitions, I get kafka.common.OffsetOutOfRangeException and my spark job crashes.

I want to understand if there is a graceful way to handle this failure and not kill the job. I want to keep ignoring these exceptions, as some other partitions are fine and I am okay with data loss.

Is there any way to handle this and not have my spark job crash? I have no option of increasing the kafka retention period.

I tried to have the DStream returned by createDirectStream() wrapped in a Try construct, but since the exception happens in the executor, the Try construct didn't take effect. Do you have any ideas of how to handle this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to gracefully handle Kafka OffsetOutOfRangeException

nimmi.cv
This post has NOT been accepted by the mailing list yet.
Did you find out how ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to gracefully handle Kafka OffsetOutOfRangeException

Ramkumar Venkataraman
This post has NOT been accepted by the mailing list yet.
Nope, but when we migrated to spark 1.6, we didnt see the errors yet. Not sure if they fixed in between releases or it just be a weird timing thing that we havent discovered yet in 1.6 as well.

On Sat, Mar 4, 2017 at 12:00 AM, nimmi.cv [via Apache Spark User List] <[hidden email]> wrote:
Did you find out how ?


To unsubscribe from How to gracefully handle Kafka OffsetOutOfRangeException, click here.
NAML

Loading...