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

Should verify whether the path name is valid in the WebHDFS

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      When creating a file using WebHDFS, there are two main steps:
      1. Obtain the location of the Datanode to be written.
      2. Put the file to this location.

      Currently NameNodeRpcServer verifies that pathName is valid, but NamenodeWebHdfsMethods and RouterWebHdfsMethods do not.

      So if we use an invalid path(such as duplicated slash), the first step returns success, but the second step throws an InvalidPathException. IMO, we should also do the validation in WebHdfs, which is consistent with the NameNodeRpcServer.

      The same webHDFS operations are: CREATE, APPEND, OPEN, GETFILECHECKSUM. So we can add DFSUtil.isValidName to redirectURI for NamenodeWebHdfsMethods and RouterWebHdfsMethods.

      Attachments

        Issue Links

          Activity

            People

              tomscut Tao Li
              tomscut Tao Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h