kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Yu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (KAFKA-5301) Improve exception handling on consumer path
Date Mon, 11 Sep 2017 02:09:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160466#comment-16160466
] 

Richard Yu edited comment on KAFKA-5301 at 9/11/17 2:08 AM:
------------------------------------------------------------

In regards to the first point that [~guozhang] mentioned:

1. If an exception was thrown, for example, in the {{onPartitionsRevoked}} method. A {{RebalanceException}}
is thrown. Notice that there is also a variable, which is private, that is set to that exception:

{code}
streamThread.setRebalanceException(t);
{code} 

2. What the {{ConsumerCoordinator}} class could do:
    a) Make the variable storing the exception accessible to outside classes.
    b) If the variable had been changed from its default value (if there is one), then 
        {{StreamTask}}, the class in which the method callback is defined, would not rethrow
the   
        exception.


was (Author: yohan123):
In regards to the first point that [~guozhang] mentioned:

1. If an exception was thrown, for example, in the {{onPartitionsRevoked}} method. A {{RebalanceException}}
is thrown. Notice that there is also a variable, which is private, that is set to that exception:

{code}
streamThread.setRebalanceException(t);
{code} 

2. What the {{StreamThread}} class could do:
    a) Make the variable storing the exception accessible to outside classes.
    b) If the variable had been changed from its default value (if there is one), then 
        {{ConsumerCoordinator}} class would not rethrow the exception.

> Improve exception handling on consumer path
> -------------------------------------------
>
>                 Key: KAFKA-5301
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5301
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: streams
>    Affects Versions: 0.11.0.0
>            Reporter: Eno Thereska
>             Fix For: 1.0.0
>
>
> Used in StreamsThread.java, mostly to .poll() but also to restore data.
> Used in StreamsTask.java, mostly to .pause(), .resume()
> All exceptions here are currently caught all the way up to the main running loop in a
broad catch(Exception e) statement in StreamThread.run().
> One main concern on the consumer path is handling deserialization errors that happen
before streams has even had a chance to look at the data: https://issues.apache.org/jira/browse/KAFKA-5157
 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message