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

Remove redundant RPC requests for getFileLinkInfo in ClientNamenodeProtocolTranslatorPB

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0, 3.2.3, 3.3.2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      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.001.patch
          1 kB
          lei w
        2. HDFS-16073.patch
          1 kB
          lei w

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: