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

Li Cheng resolved HDDS-4365.
----------------------------
    Resolution: Fixed

> SCMBlockLocationFailoverProxyProvider should use 
> ScmBlockLocationProtocolPB.class in RPC.setProtocolEngine
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-4365
>                 URL: https://issues.apache.org/jira/browse/HDDS-4365
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>          Components: SCM
>            Reporter: Glen Geng
>            Assignee: Glen Geng
>            Priority: Minor
>              Labels: pull-request-available
>
> in SCMBlockLocationFailoverProxyProvider,
> currently it is
> {code:java}
> private ScmBlockLocationProtocolPB createSCMProxy(
>     InetSocketAddress scmAddress) throws IOException {
>   ...
>   RPC.setProtocolEngine(hadoopConf, ScmBlockLocationProtocol.class,
>       ProtobufRpcEngine.class);
>   ...{code}
>  it should be 
> {code:java}
> private ScmBlockLocationProtocolPB createSCMProxy(
>     InetSocketAddress scmAddress) throws IOException {
>   ...
>   RPC.setProtocolEngine(hadoopConf, ScmBlockLocationProtocolPB.class,
>       ProtobufRpcEngine.class);
>   ...{code}
>  
> FYi, according to non-HA version
> {code:java}
> private static ScmBlockLocationProtocol getScmBlockClient(
>     OzoneConfiguration conf) throws IOException {
>   RPC.setProtocolEngine(conf, ScmBlockLocationProtocolPB.class,
>       ProtobufRpcEngine.class);
>   long scmVersion =
>       RPC.getProtocolVersion(ScmBlockLocationProtocolPB.class);
>   InetSocketAddress scmBlockAddress =
>       getScmAddressForBlockClients(conf);
>   ScmBlockLocationProtocolClientSideTranslatorPB scmBlockLocationClient =
>       new ScmBlockLocationProtocolClientSideTranslatorPB(
>           RPC.getProxy(ScmBlockLocationProtocolPB.class, scmVersion,
>               scmBlockAddress, UserGroupInformation.getCurrentUser(), conf,
>               NetUtils.getDefaultSocketFactory(conf),
>               Client.getRpcTimeout(conf)));
>   return TracingUtil
>       .createProxy(scmBlockLocationClient, ScmBlockLocationProtocol.class,
>           conf);
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to