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

ASF GitHub Bot commented on TWILL-151:
--------------------------------------

Github user hsaputra commented on a diff in the pull request:

    https://github.com/apache/incubator-twill/pull/65#discussion_r41690956
  
    --- Diff: 
twill-core/src/main/java/org/apache/twill/internal/kafka/client/SimpleKafkaConsumer.java
 ---
    @@ -376,8 +379,13 @@ public void run() {
               // Call the callback
               invokeCallback(messages, offset);
             } catch (Throwable t) {
    -          if (running || !(t instanceof ClosedByInterruptException)) {
    -            // Only log if it is still running, otherwise, it just the 
interrupt caused by the stop.
    +          // Only log if it is still running, otherwise, it just the 
interrupt caused by the stop.
    +          String expMsg = "Unable to fetch messages on {},service shutdown 
is in progress.";
    --- End diff --
    
    I would prefer to have different error messages for these 2 new cases to 
help debug issue when needed.


> Improve Logging error when fetching message after Kafka server is stopped
> -------------------------------------------------------------------------
>
>                 Key: TWILL-151
>                 URL: https://issues.apache.org/jira/browse/TWILL-151
>             Project: Apache Twill
>          Issue Type: Bug
>            Reporter: Shankar Selvam
>
> when we add LogHandler, We start a Kafka Consumer thread in Client that polls 
> Kafka Server (Started when AM Starts).
> When the AM stops, we stop the kafka server, but there can be race where we 
> make request to fetch message from the KafkaConsumer after the Kafka Server 
> is stopped. We log the stack-trace in this case and it can be confusing for 
> the user, we can improve the error logging in this case to make it cleaner.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to