[ https://issues.apache.org/jira/browse/HDFS-5696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andras Bokor resolved HDFS-5696. -------------------------------- Resolution: Duplicate > Examples for httpfs REST API incorrect on apache.org > ---------------------------------------------------- > > Key: HDFS-5696 > URL: https://issues.apache.org/jira/browse/HDFS-5696 > Project: Hadoop HDFS > Issue Type: Bug > Components: documentation > Affects Versions: 2.2.0 > Environment: NA > Reporter: Casey Brotherton > Priority: Trivial > > The examples provided for the httpfs REST API are incorrect. > http://hadoop.apache.org/docs/r2.2.0/hadoop-hdfs-httpfs/index.html > http://hadoop.apache.org/docs/r2.0.5-alpha/hadoop-hdfs-httpfs/index.html > From the documentation: > ***************************** > HttpFS is a separate service from Hadoop NameNode. > HttpFS itself is Java web-application and it runs using a preconfigured > Tomcat bundled with HttpFS binary distribution. > HttpFS HTTP web-service API calls are HTTP REST calls that map to a HDFS file > system operation. For example, using the curl Unix command: > $ curl http://httpfs-host:14000/webhdfs/v1/user/foo/README.txt returns the > contents of the HDFS /user/foo/README.txt file. > $ curl http://httpfs-host:14000/webhdfs/v1/user/foo?op=list returns the > contents of the HDFS /user/foo directory in JSON format. > $ curl -X POST http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=mkdirs > creates the HDFS /user/foo.bar directory. > ******************* > The commands have incorrect "op"erations. ( Verified through source code in > HttpFSFileSystem.java ) > In addition, although the webhdfs documentation specifies user.name as > optional, on my cluster, each action required a "user.name" > It should be included in the short examples to allow for the greatest chance > of success. > Three examples rewritten: > curl -i -L > "http://httpfs-host:14000/webhdfs/v1/user/foo/README.txt?op=open&user.name=hdfsuser" > curl -i > "http://httpfs-host:14000/webhdfs/v1/user/foo/?op=liststatus&user.name=hdfsuser" > curl -i -X PUT > "http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=mkdirs&user.name=hdfsuser" > Not sure what the convention should be for specifying the user.name. Use > hdfs? or a name that is obviously an example? > It would also be beneficial if the HTTPfs page linked to the webhdfs > documentation page in the text instead of just on the menu sidebar. > http://hadoop.apache.org/docs/r2.2.0/hadoop-project-dist/hadoop-hdfs/WebHDFS.html -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org