[
https://issues.apache.org/jira/browse/HDFS-4649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622342#comment-13622342
]
Hudson commented on HDFS-4649:
------------------------------
Integrated in Hadoop-Mapreduce-trunk #1390 (See
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1390/])
HDFS-4649. Webhdfs cannot list large directories. Contributed by Daryn
Sharp. (Revision 1463698)
Result = SUCCESS
kihwal : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463698
Files :
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
*
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
*
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java
> Webhdfs cannot list large directories
> -------------------------------------
>
> Key: HDFS-4649
> URL: https://issues.apache.org/jira/browse/HDFS-4649
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode, security, webhdfs
> Affects Versions: 0.23.0, 2.0.0-alpha, 3.0.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Priority: Blocker
> Fix For: 3.0.0, 0.23.7, 2.0.4-alpha
>
> Attachments: HDFS-4649.branch-23.patch, HDFS-4649.branch-23.patch,
> HDFS-4649.patch
>
>
> Webhdfs returns malformed json for directories that exceed the conf
> {{dfs.ls.limit}} value. The streaming object returned by
> {{NamenodeWebhdfsMethods#getListingStream}} will repeatedly call
> {{getListing}} for each segment of the directory listing.
> {{getListingStream}} runs within the remote user's ugi and acquires the first
> segment of the directory, then returns a streaming object. The streaming
> object is later executed _outside of the user's ugi_. Luckily it runs as the
> host service principal (ie. {{host/namenode@REALM}}) so the result is
> permission denied for the "host" user:
> {noformat}
> org.apache.hadoop.security.AccessControlException: Permission denied:
> user=host, access=EXECUTE, inode="/path":someuser:group:drwx------
> {noformat}
> The exception causes the streamer to prematurely abort the json output
> leaving it malformed. Meanwhile, the client sees the cryptic:
> {noformat}
> java.lang.IllegalStateException: unexpected end of array
> at org.mortbay.util.ajax.JSON.parseArray(JSON.java:902)
> [...]
> at
> org.apache.hadoop.hdfs.web.WebHdfsFileSystem.jsonParse(WebHdfsFileSystem.java:242)
> at
> org.apache.hadoop.hdfs.web.WebHdfsFileSystem.run(WebHdfsFileSystem.java:441)
> at
> org.apache.hadoop.hdfs.web.WebHdfsFileSystem.listStatus(WebHdfsFileSystem.java:717)
> [...]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira