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

ASF GitHub Bot updated HDDS-3560:
---------------------------------
    Labels: pull-request-available  (was: )

> 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
>            Priority: Major
>              Labels: pull-request-available
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to