[ 
https://issues.apache.org/jira/browse/YARN-10081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Antal reassigned YARN-10081:
---------------------------------

    Assignee: Ravuri Sushma sree

> Exception message from ClientRMProxy#getRMAddress is misleading
> ---------------------------------------------------------------
>
>                 Key: YARN-10081
>                 URL: https://issues.apache.org/jira/browse/YARN-10081
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn
>    Affects Versions: 3.3.0
>            Reporter: Adam Antal
>            Assignee: Ravuri Sushma sree
>            Priority: Trivial
>         Attachments: YARN-10081.001.patch
>
>
> In {{ClientRMProxy#getRMAddress}} in the else branch we have the following 
> piece of code.
> {code:java}
>     } else {
>       String message = "Unsupported protocol found when creating the proxy " +
>           "connection to ResourceManager: " +
>           ((protocol != null) ? protocol.getClass().getName() : "null");
>       LOG.error(message);
>       throw new IllegalStateException(message);
>     }
> {code}
> This is wrong, because the protocol variable is of type "Class<?>", so 
> {{Class.getClass()}} will be always {{Object}}. It should be 
> {{protocol.getName()}}. 
> An example of the error message if {{RMProxy}} is misused, and this exception 
> is thrown:
> {noformat}
> java.lang.IllegalStateException: Unsupported protocol found when creating the 
> proxy connection to ResourceManager: java.lang.Class
>       at 
> org.apache.hadoop.yarn.client.ClientRMProxy.getRMAddress(ClientRMProxy.java:109)
>       at 
> org.apache.hadoop.yarn.client.RMProxy.newProxyInstance(RMProxy.java:133)
>         ...
> {noformat}
> where obviously not a {{Object.class}} was provided to this function as 
> protocol parameter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to