[ 
https://issues.apache.org/jira/browse/HDFS-12846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jitendra Nath Pandey reassigned HDFS-12846:
-------------------------------------------

    Assignee: Bharat Viswanadham

> WebHDFS/Jetty misinterprets empty path
> --------------------------------------
>
>                 Key: HDFS-12846
>                 URL: https://issues.apache.org/jira/browse/HDFS-12846
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 2.8.0
>         Environment: HDP 2.6 + Ambari 2.6.0
>            Reporter: David Tucker
>            Assignee: Bharat Viswanadham
>
> WebHDFS sees the wrong path when a request does not provide one.
> For example, GETFILESTATUS on an empty path results in a 
> FileNotFoundException:
> {code}
> $ curl -sS -L -w '%{http_code}' -X GET 
> 'http://172.18.0.3:50070/webhdfs/v1?op=GETFILESTATUS&user.name=hdfs'
> {"RemoteException":{"exception":"FileNotFoundException","javaClassName":"java.io.FileNotFoundException","message":"File
>  does not exist: /webhdfs/v1"}}404
> {code}
> Note the message: the RPC is seeing an incorrect path (/webhdfs/v1).
> Because of AMBARI-22492, this leads to unexpected behaviors when deploying 
> with Ambari:
> - GETFILESTATUS is issued as /webhdfs/v1?op=GETFILESTATUS which results in a 
> FileNotFoundException.
> - Since Ambari was told the path doesn't exist, it tries to create it with 
> MKDIRS (which succeeds!):
> {code}
> $ curl -sS -L -w '%{http_code}' -X PUT 
> 'http://172.18.0.3:50070/webhdfs/v1?op=MKDIRS&user.name=hdfs'
> {"boolean":true}200
> {code}
> {code}
> # hdfs dfs -ls -R /webhdfs
> drwx------   - hive hadoop          0 2017-11-20 23:24 /webhdfs/v1
> ls: Permission denied: user=root, access=READ_EXECUTE, 
> inode="/webhdfs/v1":hive:hadoop:drwx------
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to