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

Bikas Saha commented on YARN-513:
---------------------------------

What is the use of the defaultPolicy argument passed in addition to the 
exception map? And why is it the same as the policy used for the exceptions in 
the exception map?

In the following code if we keep getRMClient() and inside it we use the body of 
createRMProxy then the same result is achieved right? The result being 
returning a new ResourceTracker object. So there is no need to remove 
getRMClient from NodeStatusUpdater. Existing test already override getRMClient 
to return test ResourceTracker objects. So there should be no change required 
in existing tests if getRMClient is not removed. The tests dont need to use a 
proxy ResourceTracker object, right?
{code}
-  protected ResourceTracker getRMClient() {
-    Configuration conf = getConfig();
-    YarnRPC rpc = YarnRPC.create(conf);
-    return (ResourceTracker) rpc.getProxy(ResourceTracker.class, rmAddress,
-        conf);
+  @VisibleForTesting
+  protected ResourceTracker createRMProxy(Configuration conf)
+      throws IOException {
+    return RMProxy.createRMProxy(conf, ResourceTracker.class, rmAddress);
   }
{code}
                
> 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