[ https://issues.apache.org/jira/browse/YARN-3471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892774#comment-15892774 ]
Haibo Chen commented on YARN-3471: ---------------------------------- 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. 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org