You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eagle.apache.org by chitin <gi...@git.apache.org> on 2016/11/28 09:44:30 UTC

[GitHub] incubator-eagle pull request #691: EAGLE-796 MRJobEntityCreationHandler flus...

GitHub user chitin opened a pull request:

    https://github.com/apache/incubator-eagle/pull/691

    EAGLE-796 MRJobEntityCreationHandler flush need N times

    EAGLE-796 MRJobEntityCreationHandler flush need N times
    - It will retry until flushing has succeeded or tried more than 3 times.
    
    https://issues.apache.org/jira/browse/EAGLE-796

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

    $ git pull https://github.com/chitin/incubator-eagle EAGLE-796

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

    https://github.com/apache/incubator-eagle/pull/691.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 #691
    
----

----


---
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-eagle pull request #691: EAGLE-796 MRJobEntityCreationHandler flus...

Posted by wujinhu <gi...@git.apache.org>.
Github user wujinhu commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/691#discussion_r89947354
  
    --- Diff: eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobEntityCreationHandler.java ---
    @@ -79,10 +79,7 @@ public boolean flush() {
                 eagleServiceConfig.password);
             client.getJerseyClient().setReadTimeout(eagleServiceConfig.readTimeoutSeconds * 1000);
             try {
    -            LOG.info("start to flush mr job entities, size {}", entities.size());
    -            client.create(entities);
    -            LOG.info("finish flushing mr job entities, size {}", entities.size());
    -            entities.clear();
    +            return createEntities(client);
             } catch (Exception e) {
                 LOG.warn("exception found when flush entities, {}", e);
                 e.printStackTrace();
    --- End diff --
    
    Pls help to remove log like this line. Thanks!


---
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-eagle pull request #691: EAGLE-796 MRJobEntityCreationHandler flus...

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

    https://github.com/apache/incubator-eagle/pull/691


---
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-eagle pull request #691: EAGLE-796 MRJobEntityCreationHandler flus...

Posted by wujinhu <gi...@git.apache.org>.
Github user wujinhu commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/691#discussion_r89927959
  
    --- Diff: eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobEntityCreationHandler.java ---
    @@ -78,24 +78,36 @@ public boolean flush() {
                 eagleServiceConfig.username,
                 eagleServiceConfig.password);
             client.getJerseyClient().setReadTimeout(eagleServiceConfig.readTimeoutSeconds * 1000);
    -        try {
    -            LOG.info("start to flush mr job entities, size {}", entities.size());
    -            client.create(entities);
    -            LOG.info("finish flushing mr job entities, size {}", entities.size());
    -            entities.clear();
    -        } catch (Exception e) {
    -            LOG.warn("exception found when flush entities, {}", e);
    -            e.printStackTrace();
    -            return false;
    -        } finally {
    -            client.getJerseyClient().destroy();
    +
    +        int count = 0;
    +        boolean success = false;
    +        while (count++ < MAX_RETRY_COUNT && !success) {
                 try {
    -                client.close();
    +                LOG.info("start to flush mr job entities, size {}", entities.size());
    +                client.create(entities);
    +                LOG.info("finish flushing mr job entities, size {}", entities.size());
    +                entities.clear();
    +                success = true;
    +                LOG.info("Success of flushing mr job entities");
                 } catch (Exception e) {
    -                // ignored exception
    +                LOG.warn("exception found when flush entities, {}", e);
    +            } finally {
    +                client.getJerseyClient().destroy();
    --- End diff --
    
    I do not think this retry logic will work. If flush failed first time, client will be destroyed or closed!


---
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-eagle pull request #691: EAGLE-796 MRJobEntityCreationHandler flus...

Posted by chitin <gi...@git.apache.org>.
Github user chitin commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/691#discussion_r89948452
  
    --- Diff: eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobEntityCreationHandler.java ---
    @@ -79,10 +79,7 @@ public boolean flush() {
                 eagleServiceConfig.password);
             client.getJerseyClient().setReadTimeout(eagleServiceConfig.readTimeoutSeconds * 1000);
             try {
    -            LOG.info("start to flush mr job entities, size {}", entities.size());
    -            client.create(entities);
    -            LOG.info("finish flushing mr job entities, size {}", entities.size());
    -            entities.clear();
    +            return createEntities(client);
             } catch (Exception e) {
                 LOG.warn("exception found when flush entities, {}", e);
                 e.printStackTrace();
    --- End diff --
    
    Done.Thanks!


---
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.
---