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

Jian He commented on YARN-1879:
-------------------------------

RetryCache is used to handle retries at *RPC level* to return the previous 
response for duplicate non-idempotent requests. Allocate() call already has a 
similar retry cache mechanism by checking the request Id of the request, but 
that also serves the *App level* retry.  [~vinodkv], is it fine to keep both?

some comments on the patch:
testAPIsWithRetryCache:
- Assert exception type inside catch block.
{code}
      } catch (InvalidApplicationMasterRequestException e) {
      }
} catch (InvalidApplicationMasterRequestException e) {
        // InvalidApplicationMasterRequestException is thrown
        // after expiring RetryCache
      }
{code}
- TestNamenodeRetryCache class comment is useful for  
TestApplicationMasterServiceRetryCache too, we can copy that over.
- org.junit.Assert.assertEquals -> assertEquals

some suggestions on the configs to conform with existing YarnConfigs:
- RM_APPMASTER_ENABLE_RETRY_CACHE_KEY -> RM_RETRY_CACHE_ENABLED
-  Remove the APPMASTER in the config name so that the same config can be used 
for other service later on?
- Use RM_PREFIX instead of YARN_PREFIX;
- RM_APPMASTER_ENABLE_RETRY_CACHE_DEFAULT-> DEFAULT_RM_RETRY_CACHE_ENABLED to 
conform with the naming of other default configs.
- RM_APPMASTER_RETRY_CACHE_HEAP_PERCENT_KEY -> RM_RETRY_CACHE_HEAP_PERCENT
- RM_APPMASTER_RETRY_CACHE_EXPIRYTIME_MILLIS_KEY->RM_RETRY_CACHE_EXPIRY_MS

> 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: Tsuyoshi OZAWA
>            Priority: Critical
>         Attachments: YARN-1879.1.patch, YARN-1879.1.patch, 
> YARN-1879.2-wip.patch, YARN-1879.2.patch, YARN-1879.3.patch, YARN-1879.4.patch
>
>




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

Reply via email to