[ https://issues.apache.org/jira/browse/YARN-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951789#comment-13951789 ]
Xuan Gong commented on YARN-1879: --------------------------------- bq. Both register and unregister are checking whether the application has registered/unregistered before. If the application has already registered/unregistered, duplicate register/unregister attempts can cause exceptions. are they still idempotent ? So, for ApplicationMasterService#registerApplicationMaster: {code} if (hasApplicationMasterRegistered(applicationAttemptId)) {code} is true, instead of throwing exception, we return the response which is used to register the applicationMaster (Means we may need to save the RegisterApplicationMasterResponse) ? for ApplicationMasterService#finishApplicationMaster {code} if (lock == null) { throwApplicationDoesNotExistInCacheException(applicationAttemptId); } {code} Instead of throw the exception, we can check AppAttempt from RMContext. If it exists, throw the exception, otherwise return FinishApplicationMasterResponse based on the appAttempt state ? What do you think ? > Mark Idempotent/AtMostOnce annotations to ApplicationMasterProtocol > ------------------------------------------------------------------- > > Key: YARN-1879 > URL: https://issues.apache.org/jira/browse/YARN-1879 > Project: Hadoop YARN > Issue Type: Sub-task > Components: resourcemanager > Reporter: Jian He > Assignee: Xuan Gong > Priority: Blocker > Attachments: YARN-1879.1.patch > > -- This message was sent by Atlassian JIRA (v6.2#6252)