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

Xuan Gong commented on YARN-1521:
---------------------------------

bq.  We should be using RetryCache to populate the response from the actual 
response that was returned for the original request that got retried.

Also, about the RetryCache. In HDFS, it saves each operation in the editLog, 
and then recovers the RetryCache based on the editLog.
For Yarn, I think that we already have our own RetryCache. The RMStateStore can 
do the same thing. We save the applicationState, etc. to RMStateStore just like 
HDFS saves all operations into editLog. We read all states back to RM just like 
we recover the RetryCache from the editLog. 

How HDFS decides whether gives the previous responses is based on the operation 
status in the RetryCache. For Yarn, how we decide whether submitApplication is 
successful or not when failover happens, we check whether the app exist in 
RMContext (which is recovered from RMStateStore). We have similar behaviors.

The only difference, I think, is that RetryCache has status for all the 
operations (delete, create, etc). For us, we save them into different places, 
such as RMContext, RMDelegationTokenSecretManager.

> Mark appropriate protocol methods with the idempotent annotation or 
> AtMostOnce annotation
> -----------------------------------------------------------------------------------------
>
>                 Key: YARN-1521
>                 URL: https://issues.apache.org/jira/browse/YARN-1521
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Xuan Gong
>            Assignee: Xuan Gong
>            Priority: Blocker
>             Fix For: 2.4.0
>
>         Attachments: YARN-1521.0.patch, YARN-1521.1.patch, YARN-1521.2.patch, 
> YARN-1521.3.patch
>
>
> After YARN-1028, we add the automatically failover into RMProxy. This JIRA is 
> to identify whether we need to add idempotent annotation and which methods 
> can be marked as idempotent.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to