hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yongjun Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12139) HTTPFS liststatus returns incorrect pathSuffix for path of file
Date Tue, 18 Jul 2017 23:00:00 GMT

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

Yongjun Zhang commented on HDFS-12139:

All good catches, thanks much [~xiaochen]! I just uploaded rev2 to address most of them. 

About the assertEquals, most of the statements there are cross-checking each other, and I
tried to use a convenient order, for that ones that do have an exact expected value, I reordered
the parameters. Appreciate your look at rev2.

> HTTPFS liststatus returns incorrect pathSuffix for path of file
> ---------------------------------------------------------------
>                 Key: HDFS-12139
>                 URL: https://issues.apache.org/jira/browse/HDFS-12139
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: httpfs
>            Reporter: Yongjun Zhang
>            Assignee: Yongjun Zhang
>         Attachments: HDFS-12139.001.patch, HDFS-12139.002.patch
> Per the following logs, we can see that liststatus returns the same pathSuffix "test.txt"
for  /tmp/yj/yj1 and /tmp/yj/yj1/test.txt, which is wrong. The pathSuffix for the latter should
be empty. 
> {code}
> [thost ~]$ hadoop fs -copyFromLocal test.txt /tmp/yj/yj1
> [thost ~]$ curl "http://thost.x.y:14000/webhdfs/v1/tmp/yj/yj1?op=LISTSTATUS&user.name=tuser"
> {"FileStatuses":{"FileStatus":[{"pathSuffix":"test.txt","type":"FILE","length":16,"owner":"tuser","group":"supergroup","permission":"644","accessTime":1500007684989,"modificationTime":1500007685286,"blockSize":134217728,"replication":3}]}}
> [thost ~]$ curl "http://thost.x.y:14000/webhdfs/v1/tmp/yj/yj1/test.txt?op=LISTSTATUS&user.name=tuser"
> {"FileStatuses":{"FileStatus":[{"pathSuffix":"test.txt","type":"FILE","length":16,"owner":"tuser","group":"supergroup","permission":"644","accessTime":1500007684989,"modificationTime":1500007685286,"blockSize":134217728,"replication":3}]}}
> {code}
> Due to this bug, the symptom of running distcp with httpfs to copy a single file /tmp/test.txt
> {quote}
> WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:systest
(auth:PROXY) via httpfs (auth:SIMPLE) cause:org.apache.hadoop.security.AccessControlException:
Permission denied: user=systest, access=EXECUTE, inode="/tmp/test.txt":systest:supergroup:-rw-r--r--
(Ancestor /tmp/test.txt is not a directory).
> {quote}
> because /tmp/test.txt is treated as /tmp/test.txt/test.txt.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message