Issue Details (XML | Word | Printable)

Key: HADOOP-1858
Type: Bug Bug
Status: Closed Closed
Resolution: Invalid
Priority: Minor Minor
Assignee: Unassigned
Reporter: Raghu Angadi
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

".." for ls does not check for existence of its parent directory.

Created: 07/Sep/07 06:11 PM   Updated: 08/Jul/09 04:42 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Reference
 

Resolution Date: 24/Sep/07 10:20 PM


 Description  « Hide
'bin/hadoop -ls /user/nonexistent/..' lists /user even if /user/nonexistent directory does not exist.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Chris Douglas added a comment - 24/Sep/07 09:19 PM
It's not clear this is the wrong behavior. The path normalization in java.net.URI follows RFC2396, so the collapse of dot-segments is part of every Path's construction, prior to its interaction with a FileSystem. This seems like a POSIX/URI inconsistency, not necessarily a bug. Further, checking each parent URI for every relative path is relatively expensive in HDFS, so rewriting that section of the URI RFC doesn't seem like a good solution, either.

Is this causing problems somewhere?


Raghu Angadi added a comment - 24/Sep/07 09:27 PM
I agree. I don't think it is really a bug either. It did not cause any particular problem.

From the shell, currently there does not seem to be a way to find if a particular directory exists. In that context, I tried if listing '..' might fail and indicate that such a directory does not exists.


Chris Douglas added a comment - 24/Sep/07 09:50 PM
bin/hadoop dfs -stat <path> can check for a particular directory... but I'm not sure I follow your example.

I think we can close this.