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

Wrong HttpFS test command in doc

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      There are 2 errors in section Test HttpFS is working in http://hadoop.apache.org/docs/r2.7.3/hadoop-hdfs-httpfs/ServerSetup.html

      ~ $ curl -i "http://<HTTPFSHOSTNAME>:14000?user.name=babu&op=homedir"
      HTTP/1.1 200 OK
      Content-Type: application/json
      Transfer-Encoding: chunked
      
      {"homeDir":"http:\/\/<HTTPFS_HOST>:14000\/user\/babu"}
      
      1. The URL path should be /webhdfs/v1.
      2. The op should be gethomedirectory, not homedir.

      The curl command would produce this error:

      $ curl 'http://localhost:14000/webhdfs/v1?op=homedir&user.name=hdfs' | json_pp
      {
         "RemoteException" : {
            "message" : "java.lang.IllegalArgumentException: No enum constant org.apache.hadoop.fs.http.client.HttpFSFileSystem.Operation.HOMEDIR",
            "exception" : "QueryParamException",
            "javaClassName" : "com.sun.jersey.api.ParamException$QueryParamException"
         }
      }
      

      The correct command should be:

      $ curl 'http://localhost:14000/webhdfs/v1?op=gethomedirectory&user.name=hdfs' | json_pp
      {
         "Path" : "/user/hdfs"
      }
      

      Attachments

        1. HDFS-11174.001.patch
          1 kB
          John Zhuge

        Activity

          People

            jzhuge John Zhuge
            jzhuge John Zhuge
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: