[ https://issues.apache.org/jira/browse/HDFS-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Chu updated HDFS-4085: ------------------------------ Description: I used double forward slashes when specifying the path while using WebHDFS and got an invalid path exception: webhdfs: {noformat} [schu@cs-10-20-81-73 hadoop]$ curl -i -X PUT "http://cs-10-20-81-73.cloud.cloudera.com:50070/webhdfs/v1//user/schu/testDir33?op=MKDIRS&user.name=schu"HTTP/1.1 400 Bad Request Content-Type: application/json Expires: Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: hadoop.auth="u=schu&p=schu&t=simple&e=1350708634267&s=ceRpGprrUsPZ2tqcM5Awy2NPOak=";Path=/ Transfer-Encoding: chunked Server: Jetty(6.1.26.cloudera.2) {"RemoteException":{"exception":"InvalidPathException","javaClassName":"org.apache.hadoop.fs.InvalidPathException","message":"Invalid path name //user/schu/testDir33"}} {noformat} When doing the same with httpfs, I got an AccessControlException. httpfs: {noformat} [schu@cs-10-20-81-73 hadoop]$ curl -i -X PUT "http://cs-10-20-81-73.cloud.cloudera.com:14000/webhdfs/v1//user/schu/testDir33?op=MKDIRS&user.name=schu" HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Set-Cookie: hadoop.auth="u=schu&p=schu&t=simple&e=1350708639250&s=diEOTnuANr3T1cZx/dCz72BpPAM="; Version=1; Path=/ Content-Type: application/json Transfer-Encoding: chunked Date: Fri, 19 Oct 2012 18:50:39 GMT Connection: close {"RemoteException":{"message":"Permission denied: user=schu, access=WRITE, inode=\"\/\":hdfs:supergroup:drwxr-xr-x","exception":"AccessControlException","javaClassName":"org.apache.hadoop.security.AccessControlException"}} [schu@cs-10-20-81-73 hadoop]$ {noformat} was: I used double forward slashes when specifying the path while using WebHDFS and got an invalid path exception: webhdfs: {noformat} [schu@cs-10-20-81-73 hadoop]$ curl -i -X PUT "http://cs-10-20-81-73.cloud.cloudera.com:50070/webhdfs/v1//user/schu/testDir33?op=MKDIRS&user.name=schu"HTTP/1.1 400 Bad Request Content-Type: application/json Expires: Thu, 01-Jan-1970 00:00:00 GMT Set-Cookie: hadoop.auth="u=schu&p=schu&t=simple&e=1350708634267&s=ceRpGprrUsPZ2tqcM5Awy2NPOak=";Path=/ Transfer-Encoding: chunked Server: Jetty(6.1.26.cloudera.2) {"RemoteException":{"exception":"InvalidPathException","javaClassName":"org.apache.hadoop.fs.InvalidPathException","message":"Invalid path name //user/schu/testDir33"}} {noformat} httpfs: {noformat} [schu@cs-10-20-81-73 hadoop]$ curl -i -X PUT "http://cs-10-20-81-73.cloud.cloudera.com:14000/webhdfs/v1//user/schu/testDir33?op=MKDIRS&user.name=schu" HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Set-Cookie: hadoop.auth="u=schu&p=schu&t=simple&e=1350708639250&s=diEOTnuANr3T1cZx/dCz72BpPAM="; Version=1; Path=/ Content-Type: application/json Transfer-Encoding: chunked Date: Fri, 19 Oct 2012 18:50:39 GMT Connection: close {"RemoteException":{"message":"Permission denied: user=schu, access=WRITE, inode=\"\/\":hdfs:supergroup:drwxr-xr-x","exception":"AccessControlException","javaClassName":"org.apache.hadoop.security.AccessControlException"}} [schu@cs-10-20-81-73 hadoop]$ {noformat} > HttpFs/WebHDFS don't handle multiple forward slashes in beginning of path > ------------------------------------------------------------------------- > > Key: HDFS-4085 > URL: https://issues.apache.org/jira/browse/HDFS-4085 > Project: Hadoop HDFS > Issue Type: Bug > Components: webhdfs > Affects Versions: 2.0.0-alpha > Reporter: Stephen Chu > Priority: Minor > > I used double forward slashes when specifying the path while using WebHDFS > and got an invalid path exception: > webhdfs: > {noformat} > [schu@cs-10-20-81-73 hadoop]$ curl -i -X PUT > "http://cs-10-20-81-73.cloud.cloudera.com:50070/webhdfs/v1//user/schu/testDir33?op=MKDIRS&user.name=schu"HTTP/1.1 > 400 Bad Request > Content-Type: application/json > Expires: Thu, 01-Jan-1970 00:00:00 GMT > Set-Cookie: > hadoop.auth="u=schu&p=schu&t=simple&e=1350708634267&s=ceRpGprrUsPZ2tqcM5Awy2NPOak=";Path=/ > Transfer-Encoding: chunked > Server: Jetty(6.1.26.cloudera.2) > {"RemoteException":{"exception":"InvalidPathException","javaClassName":"org.apache.hadoop.fs.InvalidPathException","message":"Invalid > path name //user/schu/testDir33"}} > {noformat} > When doing the same with httpfs, I got an AccessControlException. > httpfs: > {noformat} > [schu@cs-10-20-81-73 hadoop]$ curl -i -X PUT > "http://cs-10-20-81-73.cloud.cloudera.com:14000/webhdfs/v1//user/schu/testDir33?op=MKDIRS&user.name=schu" > HTTP/1.1 500 Internal Server Error > Server: Apache-Coyote/1.1 > Set-Cookie: > hadoop.auth="u=schu&p=schu&t=simple&e=1350708639250&s=diEOTnuANr3T1cZx/dCz72BpPAM="; > Version=1; Path=/ > Content-Type: application/json > Transfer-Encoding: chunked > Date: Fri, 19 Oct 2012 18:50:39 GMT > Connection: close > {"RemoteException":{"message":"Permission denied: user=schu, access=WRITE, > inode=\"\/\":hdfs:supergroup:drwxr-xr-x","exception":"AccessControlException","javaClassName":"org.apache.hadoop.security.AccessControlException"}} > [schu@cs-10-20-81-73 hadoop]$ > {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