Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
Currently FSShell delete and FSShell rename don't behave as expected on symlinks. If you have /a/b/c as a link to /a/b/d, and you try to delete /a/b/c, the target /a/b/d will be deleted instead. Not only is this contrary to POSIX (and pretty much every other filesystem standard) but this gives us no way to actually delete symlinks other than deleting the containing directory.
Let's fix this so deleting a symlink deletes the symlink itself. It will just require not dereferencing the last path component. I haven't looked as closely into rename but I think there are similar issues there
Attachments
Issue Links
- duplicates
-
HADOOP-9817 FileSystem#globStatus and FileContext#globStatus need to work with symlinks
- Closed
- is related to
-
HADOOP-12331 FSShell Delete and Rename should operate on symlinks rather than their target
- Patch Available