You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Adam Antal (Jira)" <ji...@apache.org> on 2020/01/16 17:51:00 UTC

[jira] [Assigned] (YARN-10081) Exception message from ClientRMProxy#getRMAddress is misleading

     [ 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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org