You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "maobaolong (Jira)" <ji...@apache.org> on 2020/05/08 09:55:00 UTC
[jira] [Created] (HDDS-3560) hadoop version < 3.2 throw
IllegalAccessError when assign proxy
maobaolong created HDDS-3560:
--------------------------------
Summary: hadoop version < 3.2 throw IllegalAccessError when assign proxy
Key: HDDS-3560
URL: https://issues.apache.org/jira/browse/HDDS-3560
Project: Hadoop Distributed Data Store
Issue Type: Bug
Components: om, Ozone Client
Affects Versions: 0.6.0
Reporter: maobaolong
Assignee: maobaolong
The method createOMProxyIfNeeded of OMFailoverProxyProvider will throw IllegalAccessError when work with hadoop version lower than 3.2.
The following is the problem code, it want assign a proxy to `proxyInfo.proxy`.
{code:java}
private void createOMProxyIfNeeded(ProxyInfo proxyInfo,
String nodeId) {
if (proxyInfo.proxy == null) {
InetSocketAddress address = omProxyInfos.get(nodeId).getAddress();
try {
proxyInfo.proxy = createOMProxy(address);
} catch (IOException ioe) {
LOG.error("{} Failed to create RPC proxy to OM at {}",
this.getClass().getSimpleName(), address, ioe);
throw new RuntimeException(ioe);
}
}
}
{code}
But, hadoop lower than 3.2, the field proxy of proxyInfo is marked as final.
{code:java}
public static final class ProxyInfo<T> {
public final T proxy;
/*
* The information (e.g., the IP address) of the current proxy object. It
* provides information for debugging purposes.
*/
public final String proxyInfo;
...
}
{code}
So, if we want to work around, we should catch the exception and new a ProxyInfo instance instead.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org