Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2823 SCM HA Support
  3. HDDS-4365

SCMBlockLocationFailoverProxyProvider should use ScmBlockLocationProtocolPB.class in RPC.setProtocolEngine

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: SCM

      Description

      in SCMBlockLocationFailoverProxyProvider,

      currently it is

      private ScmBlockLocationProtocolPB createSCMProxy(
          InetSocketAddress scmAddress) throws IOException {
        ...
        RPC.setProtocolEngine(hadoopConf, ScmBlockLocationProtocol.class,
            ProtobufRpcEngine.class);
        ...

       it should be 

      private ScmBlockLocationProtocolPB createSCMProxy(
          InetSocketAddress scmAddress) throws IOException {
        ...
        RPC.setProtocolEngine(hadoopConf, ScmBlockLocationProtocolPB.class,
            ProtobufRpcEngine.class);
        ...

       

      FYi, according to non-HA version

      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);
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                glengeng Glen Geng
                Reporter:
                glengeng Glen Geng
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: