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: [email protected]
For additional commands, e-mail: [email protected]