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

Xuan Gong commented on YARN-513:
--------------------------------

bq:Same retryPolicy is being passed into exceptionmap and as the default value. 
Whats the use of the exceptionmap then?
We can define <exception, retryPolicy> pair, and add it to exceptionmap. When a 
exception is catch, the related retryPolicy will be used. So, it can be 
RetryPolicies.retryByException(RetryPolicies.TRY_ONCE_THEN_FAIL, 
exceptionToPolicyMap); It means if there are any exceptions which are matched 
exceptions exist in exceptionToPolicyMap, we will apply the retrypolicy we 
defined, otherwise RetryPolicies.TRY_ONCE_THEN_FAIL will be used. 
For our case, I think we should do retry only when we catch the 
connectionException. That is why I am trying to use exceptionmap here. 

bq:I think if we dont rename NMStatusUpdater.getRMClient to createRMPRoxy then 
we dont need LocalRMProxy and most of the test code changes will also disappear.
Well, the  createRMProxy actually has two steps, first it will create a proxy 
object, second, we will wrap this proxy object and retryPolicy to create a 
RetryProxy object.But at the test code, we just need to re-use the 
resourceTracker object we have already defined, we can use it as an input. That 
is the reason why localRMProxy exists.
                
> Create common proxy client for communicating with RM
> ----------------------------------------------------
>
>                 Key: YARN-513
>                 URL: https://issues.apache.org/jira/browse/YARN-513
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Bikas Saha
>            Assignee: Xuan Gong
>         Attachments: YARN-513.1.patch, YARN-513.2.patch, YARN-513.3.patch, 
> YARN-513.4.patch, YARN.513.5.patch, YARN-513.6.patch
>
>
> When the RM is restarting, the NM, AM and Clients should wait for some time 
> for the RM to come back up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to