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

Remove duplicate code in FSNameSystem#getFileInfo

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: namenode
    • Labels:
    • Target Version/s:
    • Hadoop Flags:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: