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

Remove duplicate code in FSNameSystem#getFileInfo

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • namenode
    • Reviewed

    Description

      In FSNameSystem#getFileInfo, it checks src file name two times.

          if (!DFSUtil.isValidName(src)) {
            throw new InvalidPathException("Invalid file name: " + src);
          }
          HdfsFileStatus stat = null;
          FSPermissionChecker pc = getPermissionChecker();
          checkOperation(OperationCategory.READ);
          if (!DFSUtil.isValidName(src)) {
            throw new InvalidPathException("Invalid file name: " + src);
          }
      

      The latter should be removed.

      Attachments

        1. HDFS-6006.patch
          0.9 kB
          Akira Ajisaka

        Issue Links

          Activity

            People

              aajisaka Akira Ajisaka
              aajisaka Akira Ajisaka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: