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

Remove duplicate code in FSNameSystem#getFileInfo

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment