hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harsh J (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5696) Examples for httpfs REST API incorrect on apache.org
Date Tue, 25 Aug 2015 11:51:45 GMT

    [ https://issues.apache.org/jira/browse/HDFS-5696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14711119#comment-14711119
] 

Harsh J commented on HDFS-5696:
-------------------------------

Thanks for reporting this. Care to submit a fix changing the op values to the right one? I
suspect these may be leftovers from the Hoop days.

bq. Not sure what the convention should be for specifying the user.name. Use hdfs? or a name
that is obviously an example?

Since these are curl based examples that also likely assume no kerberos setup, why not $USER
or $(whoami) instead of a hardcoded value?

> 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
(v6.3.4#6332)

Mime
View raw message