Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16073

Remove redundant RPC requests for getFileLinkInfo in ClientNamenodeProtocolTranslatorPB

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0, 3.2.3, 3.3.2
    • 3.4.0, 3.2.3, 3.3.2
    • hdfs-client
    • None

    Description

      Remove redundant RPC requests for getFileLinkInfo in ClientNamenodeProtocolTranslatorPB. The original logic is as follows:

      @Override
      public HdfsFileStatus getFileLinkInfo(String src) throws IOException {
        GetFileLinkInfoRequestProto req = GetFileLinkInfoRequestProto.newBuilder()
            .setSrc(src).build();
        try {
          GetFileLinkInfoResponseProto result = rpcProxy.getFileLinkInfo(null, req);// First getFileLinkInfo RPC request
          return result.hasFs() ?
              PBHelperClient.convert(rpcProxy.getFileLinkInfo(null, req).getFs()) :// Repeated getFileLinkInfo RPC request
              null;
        } catch (ServiceException e) {
          throw ProtobufHelper.getRemoteException(e);
        }
      }
      

      Attachments

        1. HDFS-16073.patch
          1 kB
          lei w
        2. HDFS-16073.001.patch
          1 kB
          lei w

        Activity

          People

            lei w lei w
            lei w lei w
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: