You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org> on 2010/02/03 06:55:19 UTC
[jira] Created: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
----------------------------------------------------------------------------------------
Key: HADOOP-6536
URL: https://issues.apache.org/jira/browse/HADOOP-6536
Project: Hadoop Common
Issue Type: Bug
Components: fs
Reporter: Amareshwari Sriramadasu
Fix For: 0.22.0
FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Gummadi updated HADOOP-6536:
---------------------------------
Status: Open (was: Patch Available)
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828974#action_12828974 ]
Ravi Gummadi commented on HADOOP-6536:
--------------------------------------
Since when symlink to a file is sent as param to fullyDelete(), it deletes the symlink only(and not the file pointed to by symlink), I think fullyDelete() should only delete the symlink even when symlink to a dir is passed as param(and should not delete the dir pointed to by symlink).
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Fix For: 0.22.0
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890180#action_12890180 ]
Hadoop QA commented on HADOOP-6536:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12449821/HADOOP-6536.v1.1.patch
against trunk revision 965696.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 new or modified tests.
-1 javadoc. The javadoc tool appears to have generated 1 warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/625/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/625/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/625/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/625/console
This message is automatically generated.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Gummadi updated HADOOP-6536:
---------------------------------
Status: Patch Available (was: Open)
The failed test TestTrash passes on my local machine. Allowing to go through Hudson again...
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890188#action_12890188 ]
Hudson commented on HADOOP-6536:
--------------------------------
Integrated in Hadoop-Common-trunk-Commit #332 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/332/])
HADOOP-6536. Fixes FileUtil.fullyDelete() not to delete the contents of the sym-linked directory. Contributed by Ravi Gummadi
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Gummadi updated HADOOP-6536:
---------------------------------
Attachment: HADOOP-6536.v1.patch
Attaching new patch to apply to the latest trunk as HADOOP-6631 has gone in.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Hemanth Yamijala (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829170#action_12829170 ]
Hemanth Yamijala commented on HADOOP-6536:
------------------------------------------
Based on a simple test I did on Linux, it appears that removal of a symlink (whether to file or directory) only removes the link. If I treat FileUtil.fullyDelete as a Java equivalent for "rm -r", then it seems to me that there's a bug in the implementation of FileUtil.fullyDelete. It should only delete the link and not contents of it. IOW, I am +1 for Ravi's proposal.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Fix For: 0.22.0
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Vinod K V (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844441#action_12844441 ]
Vinod K V commented on HADOOP-6536:
-----------------------------------
bq. I guess fullyDelete() should delete as many files as possible(similar to 'rm -rf').
+1 for this. But this is a separate issue, so I am creating a new ticket for this.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Fix For: 0.22.0
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amareshwari Sriramadasu updated HADOOP-6536:
--------------------------------------------
Status: Patch Available (was: Open)
Patch looks good.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amareshwari Sriramadasu updated HADOOP-6536:
--------------------------------------------
Status: Resolved (was: Patch Available)
Hadoop Flags: [Reviewed]
Resolution: Fixed
I just committed this. Thanks Ravi!
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829188#action_12829188 ]
Eli Collins commented on HADOOP-6536:
-------------------------------------
+1 Ravi's proposal. I would also add that fullyDelete should delete dangling links (it currently does but we should add a test). The current behavior is due to java making it difficult to identify symlinks.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Fix For: 0.22.0
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amareshwari Sriramadasu updated HADOOP-6536:
--------------------------------------------
Status: Open (was: Patch Available)
Changes look good.
bq. I would also add that fullyDelete should delete dangling links (it currently does but we should add a test).
Can you add a test for deleting dangling links also?
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Gummadi updated HADOOP-6536:
---------------------------------
Status: Patch Available (was: Open)
Allowing the patch to go through Hudson...
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Gummadi reassigned HADOOP-6536:
------------------------------------
Assignee: Ravi Gummadi
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Sreekanth Ramakrishnan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865065#action_12865065 ]
Sreekanth Ramakrishnan commented on HADOOP-6536:
------------------------------------------------
Took a look at the latest patch, the changes seem fine.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832133#action_12832133 ]
Ravi Gummadi commented on HADOOP-6536:
--------------------------------------
One more issue.
Currently FileUtil.fullyDelete(myDir) comes out stopping deletion of other files/directories if it is unable to delete a file/dir(say because of not having permissions to delete that file/dir) anywhere under myDir. This is because we return from method if the recursive call "if(!fullyDelete()) {return false;}" fails at any level of recursion.
Shouldn't it continue with deletion of other files/dirs continuing in the for loop instead of returning false here ? We can just set a boolean to false in this if() and can continue the for loop sothat return value of fullyDelete() is correct always.
For example, if we have myDir/subdir1/file1, myDir/subdir2/file2 and if fullyDelete() tries to delete file1 first and could not delete it(because subDir1 has nonwritable permissions), then fullyDelete() currently comes out without deleting file2 and subdir2.
I guess fullyDelete() should delete as many files as possible(similar to 'rm -rf').
Thoughts ?
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Fix For: 0.22.0
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865089#action_12865089 ]
Hadoop QA commented on HADOOP-6536:
-----------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12443923/HADOOP-6536.v1.patch
against trunk revision 941662.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/510/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/510/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/510/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/510/console
This message is automatically generated.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Vinod K V (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844448#action_12844448 ]
Vinod K V commented on HADOOP-6536:
-----------------------------------
bq. I guess fullyDelete() should delete as many files as possible(similar to 'rm -rf').
Filed HADOOP-6631 for this.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Fix For: 0.22.0
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889822#action_12889822 ]
Hadoop QA commented on HADOOP-6536:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12449821/HADOOP-6536.v1.1.patch
against trunk revision 964993.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 new or modified tests.
-1 javadoc. The javadoc tool appears to have generated 1 warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
-1 core tests. The patch failed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/623/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/623/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/623/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/623/console
This message is automatically generated.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Gummadi updated HADOOP-6536:
---------------------------------
Attachment: HADOOP-6536.v1.1.patch
Attaching patch adding more testcases.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior is
not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ravi Gummadi updated HADOOP-6536:
---------------------------------
Attachment: HADOOP-6536.patch
Attaching patch for trunk. This patch is on top of HADOOP-6631.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890183#action_12890183 ]
Ravi Gummadi commented on HADOOP-6536:
--------------------------------------
>> -1 javadoc. The javadoc tool appears to have generated 1 warning messages.
No javadoc warning is introduced in this patch.
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6536) FileUtil.fullyDelete(dir) behavior
is not defined when we pass a symlink as the argument
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890237#action_12890237 ]
Hudson commented on HADOOP-6536:
--------------------------------
Integrated in Hadoop-Common-trunk #398 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/398/])
HADOOP-6536. Fixes FileUtil.fullyDelete() not to delete the contents of the sym-linked directory. Contributed by Ravi Gummadi
> FileUtil.fullyDelete(dir) behavior is not defined when we pass a symlink as the argument
> ----------------------------------------------------------------------------------------
>
> Key: HADOOP-6536
> URL: https://issues.apache.org/jira/browse/HADOOP-6536
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Amareshwari Sriramadasu
> Assignee: Ravi Gummadi
> Fix For: 0.22.0
>
> Attachments: HADOOP-6536.patch, HADOOP-6536.v1.1.patch, HADOOP-6536.v1.patch
>
>
> FileUtil.fullyDelete(dir) deletes contents of sym-linked directory when we pass a symlink. If this is the behavior, it should be documented as so.
> Or it should be changed not to delete the contents of the sym-linked directory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.