You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@twill.apache.org by sanojkodikkara <gi...@git.apache.org> on 2015/09/30 12:59:40 UTC

[GitHub] incubator-twill pull request: TWILL-151 Improve Logging error when...

GitHub user sanojkodikkara opened a pull request:

    https://github.com/apache/incubator-twill/pull/65

    TWILL-151 Improve Logging error when fetching message after Kafka server

    Modified the logic to log the exception only if the service is running, if the service shutdown is under progress then the “running” flag will be false.
    Now the code wont log the “java.net.ConnectException: Connection refused” , while the service shutdown.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sanojkodikkara/incubator-twill master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-twill/pull/65.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #65
    
----
commit a62a15bd693df45d45b49d13dbdc30c76e148237
Author: sanojkodikkara <sa...@gmail.com>
Date:   2015-09-30T10:53:08Z

    TWILL-151 Improve Logging error when fetching message after Kafka server
    is stopped

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-twill pull request: TWILL-151 Improve Logging error when...

Posted by gsps1 <gi...@git.apache.org>.
Github user gsps1 commented on the pull request:

    https://github.com/apache/incubator-twill/pull/65#issuecomment-144849505
  
    This would not solve the issue described in Twill-151. 
    
    after the kafka server has stopped and before ``terminate()`` is called, the status would be in running ( ``running`` is set to false in ``terminate()``). we would receive ``java.net.ConnectException: Connection refused`` , that case is not handled by the patch. 
    
    can you update your patch to handle that case? Thanks for the PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-twill pull request: TWILL-151 Improve Logging error when...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-twill/pull/65


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-twill pull request: TWILL-151 Improve Logging error when...

Posted by hsaputra <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-twill pull request: TWILL-151 Improve Logging error when...

Posted by chtyim <gi...@git.apache.org>.
Github user chtyim commented on the pull request:

    https://github.com/apache/incubator-twill/pull/65#issuecomment-169406894
  
    Changes LGTM. Will merge it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---