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

Update the error about command line POST in httpfs documentation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 3.4.0
    • httpfs
    • None

    Description

         In the official Hadoop documentation, there is an exception when executing the following command.

       curl -X POST 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo' creates the HDFS /user/foo/bar directory.

           Command line returns results:

           {"RemoteException":{"message":"Invalid HTTP POST operation [MKDIRS]","exception":"IOException","javaClassName":"java.io.IOException"}}

           

      I checked the source code and found that the way to create the file should use PUT to submit the form.

          I modified to execute the command in PUT mode and got the result as follows

           curl -X PUT 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo' creates the HDFS /user/foo/bar directory.

           Command line returns results:

      {"boolean":true}

      . At the same time the folder is created successfully.

      Attachments

        1. HDFS-15376.001.patch
          1 kB
          bianqi

        Activity

          People

            bianqi bianqi
            bianqi bianqi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: