You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Haibo Chen (JIRA)" <ji...@apache.org> on 2017/03/02 18:52:45 UTC

[jira] [Issue Comment Deleted] (YARN-3471) Fix timeline client retry

     [ https://issues.apache.org/jira/browse/YARN-3471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Haibo Chen updated YARN-3471:
-----------------------------
    Comment: was deleted

(was: Client retry is done  in two places today after YARN-4675:
1)  In TimelineV2ClientImpl
{code:java}
  protected void putObjects(String path, MultivaluedMap<String, String> params,
      Object obj) throws IOException, YarnException {

    int retries = verifyRestEndPointAvailable();

    // timelineServiceAddress could be stale, add retry logic here.
    boolean needRetry = true;
    while (needRetry) {
      try {
        URI uri = TimelineConnector.constructResURI(getConfig(),
            timelineServiceAddress, RESOURCE_URI_STR_V2);
        putObjects(uri, path, params, obj);
        needRetry = false;
      } catch (IOException e) {
        // handle exception for timelineServiceAddress being updated.
        checkRetryWithSleep(retries, e);
        retries--;
      }
    }
  }
{code}
The client will retry upon IOExceptions thrown by  putObjects(uri, path, params, obj);

2) As as a ClientFilter of the Jersey client in TimelineConnector, namely, TimelineJerseyRetryFilter.  Requests are only retried upon connection exceptions. It already uses TimelineClientConnectionRetry logic

I think 1) is redundant given 2) has taken care of our retry cases. )

> Fix timeline client retry
> -------------------------
>
>                 Key: YARN-3471
>                 URL: https://issues.apache.org/jira/browse/YARN-3471
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: 2.8.0
>            Reporter: Zhijie Shen
>            Assignee: Haibo Chen
>              Labels: YARN-5355
>         Attachments: YARN-3471.1.patch, YARN-3471.2.patch
>
>
> I found that the client retry has some problems:
> 1. The new put methods will retry on all exception, but they should only do it upon ConnectException.
> 2. We can reuse TimelineClientConnectionRetry to simplify the retry logic.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org