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

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

Adam Antal created YARN-10081:
---------------------------------

             Summary: 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


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