[
https://issues.apache.org/jira/browse/HADOOP-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510795
]
Doug Cutting commented on HADOOP-1568:
--------------------------------------
> we need file size, replication, block size, and modification time
File size and modification time are already supported, via the Content-Length
and Last-Modified http headers. We could support replication by adding a
Replication and Block-Size by adding headers and looking for them. (An HTTP
HEAD request is used to get file status.) If we need to at all. This is not
intended as a primary access means for HDFS.
If we use a de-facto standard for exposing file systems, then we can use a
shared tool. Alternately, we can invent a format and create a specific tool.
An advantage of using the de-facto-standard is that it is a
lowest-common-denominator. We're less likely to add features that are
version-specific. It should always be compatible between HDFS versions. Older
versions can use it to access a newer version and vice versa. If we start
supporting more advanced features, then we increase the chance that we'll have
incompatibilities.
Also, note that, the way our FileSystem API works, directory listing is most
naturally separate from fetching file status. This can be optimized by caching
file status in paths returned from directory listings, but we still need a way
to fetch individual file's status information.
Using the de-facto standard also avoids having to design a feature-complete XML
schema!
> NameNode Schema for HttpFileSystem
> ----------------------------------
>
> Key: HADOOP-1568
> URL: https://issues.apache.org/jira/browse/HADOOP-1568
> Project: Hadoop
> Issue Type: New Feature
> Components: fs
> Reporter: Chris Douglas
> Assignee: Chris Douglas
>
> This issue will track the design and implementation of (the first pass of) a
> servlet on the namenode for querying its filesystem via HTTP. The proposed
> syntax for queries and responses is as follows.
> *Query*
> {noformat}GET http://<nn>:<port>/ls.jsp[<?option>[&option]*]
> HTTP/1.1{noformat}
> Where _option_ may be any of the following query parameters:
> _path_ : String (default: '/')
> _recursive_ : boolean (default: false)
> _filter_ : String (default: none)
> *Response*
> The response will be returned as an XML document in the following format:
> {noformat}
> <listing path="..." recursive="(yes|no)" filter="..."
> time="yyyy-MM-dd hh:mm:ss UTC" version="...">
> <directory path="..."/>
> <file path="..." modified="yyyy-MM-dd hh:mm:ss" blocksize="..."
> replication="..." size="..."
> dnurl="http://dn:port/streamFile?..."/>
> </listing>
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.