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/02 06:54:18 UTC

[jira] Created: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
---------------------------------------------------------------------------

                 Key: HADOOP-6531
                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
             Project: Hadoop Common
          Issue Type: Improvement
          Components: fs
            Reporter: Amareshwari Sriramadasu
            Assignee: Amareshwari Sriramadasu
            Priority: Minor
             Fix For: 0.22.0


Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Attachment: patch-6531-2.txt

Thanks for the quick review Ravi.
Patch with comments incorporated.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Status: Open  (was: Patch Available)

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829581#action_12829581 ] 

Hudson commented on HADOOP-6531:
--------------------------------

Integrated in Hadoop-Common-trunk #242 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/242/])
    . Enhance FileUtil with an API to delete all contents of a directory. Contributed by Amareshwari Sriramadasu.


> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828531#action_12828531 ] 

Hadoop QA commented on HADOOP-6531:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12434508/patch-6531-1.txt
  against trunk revision 904975.

    +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/313/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/313/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/313/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/313/console

This message is automatically generated.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Status: Patch Available  (was: Open)

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Vinod K V (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828935#action_12828935 ] 

Vinod K V commented on HADOOP-6531:
-----------------------------------

Can we also fix the javadoc of each of the fullyDelete*() methods to describe their behavior with directories, files and symlinks?

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Status: Patch Available  (was: Open)

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Status: Open  (was: Patch Available)

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Status: Open  (was: Patch Available)

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Attachment: patch-6531.txt

Patch adding the api.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hemanth Yamijala (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hemanth Yamijala updated HADOOP-6531:
-------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

I just committed this to trunk. Thanks, Amareshwari !

Can you please update the release note with the relevant API added.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Status: Patch Available  (was: Open)

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hemanth Yamijala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829181#action_12829181 ] 

Hemanth Yamijala commented on HADOOP-6531:
------------------------------------------

Seems fine to me. +1.

I think HADOOP-6536 will result in a fix to code, not just to documentation. Hence, I think it is OK to address it in a separate JIRA.


> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Attachment: patch-6531-3.txt

Patch modifying the testcase as suggested.

bq. Can we also fix the javadoc of each of the fullyDelete*() methods to describe their behavior with directories, files and symlinks?
Created HADOOP-6536 for this.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Status: Patch Available  (was: Open)

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hemanth Yamijala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828721#action_12828721 ] 

Hemanth Yamijala commented on HADOOP-6531:
------------------------------------------

I would improve the test cases just a little bit:

- Please check for return values of FileUtil.fullyDeleteContents and FileUtil.fullyDelete in test case.
- Also add a failure test case for both fullyDelete and fullyDeleteContents. We can create a new directory for which we turn off write permissions. Then fullyDelete and fullyDeleteContents should both fail and we should get a false return value that can be checked.

Code changes seem fine to me.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828975#action_12828975 ] 

Hadoop QA commented on HADOOP-6531:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12434646/patch-6531-3.txt
  against trunk revision 905860.

    +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/322/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/322/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/322/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/322/console

This message is automatically generated.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828512#action_12828512 ] 

Hadoop QA commented on HADOOP-6531:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12434506/patch-6531.txt
  against trunk revision 904975.

    +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/312/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/312/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/312/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/312/console

This message is automatically generated.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828599#action_12828599 ] 

Hadoop QA commented on HADOOP-6531:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12434518/patch-6531-2.txt
  against trunk revision 904975.

    +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/314/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/314/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/314/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/314/console

This message is automatically generated.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Ravi Gummadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828586#action_12828586 ] 

Ravi Gummadi commented on HADOOP-6531:
--------------------------------------

We are not checking the return value of fullyDeleteContents() in fullyDelete() method. But if fullyDeleteContents() returns false, next line "dir.delete()" will be executed extra for all the directories in the heirarchy that we traversed. Though it is harmless with this existing patch, it looks better to have the check here and return false if fullyDeleteContents() returns false.

Minor nit in testcase: Last 3 assertions in both testcases in TestFileUtil.java are same and can be moved to a separate method (say validateTmpDir() ) to avoid code-duplication.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Release Note: Added an api FileUtil.fullyDeleteContents(String dir) to delete contents of the directory.

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829208#action_12829208 ] 

Hudson commented on HADOOP-6531:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #156 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/156/])
    . Enhance FileUtil with an API to delete all contents of a directory. Contributed by Amareshwari Sriramadasu.


> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531-2.txt, patch-6531-3.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6531) add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amareshwari Sriramadasu updated HADOOP-6531:
--------------------------------------------

    Attachment: patch-6531-1.txt

Changed the unit test to use Junit v4 style

> add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6531
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: patch-6531-1.txt, patch-6531.txt
>
>
> Add FileUtil.fullyDeleteContents(dir) api to delete contents of a directory, not directory itself. This will be useful if we want to clear the contents of cwd.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.