You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Nigel Daley (JIRA)" <ji...@apache.org> on 2007/07/31 00:53:52 UTC

[jira] Created: (HADOOP-1665) DFS Trash feature bugs

DFS Trash feature bugs
----------------------

                 Key: HADOOP-1665
                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
             Project: Hadoop
          Issue Type: Bug
          Components: dfs
    Affects Versions: 0.13.1
            Reporter: Nigel Daley
            Priority: Blocker
             Fix For: 0.14.0


In testing the DFS Trash feature, I've run across a couple of bugs.

1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
    % bin/hadoop dfs -put file /file
    % bin/hadoop dfs -rm /file
    Moved to trash: /file
    % bin/hadoop dfs -put file /file
    % bin/hadoop dfs -rm /file
    rm: Failed to move to trash: /file

2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
    % bin/hadoop dfs -mkdir /dir
    % bin/hadoop dfs -put file /dir/file
    % bin/hadoop dfs -rm /dir/file
    Moved to trash: /dir/file
    % bin/hadoop dfs -rmr /dir
    Moved to trash: /dir
    % bin/hadoop dfs -lsr /Trash
    /Trash/Current  <dir>
    /Trash/Current/dir      <dir>
    /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
    /Trash/Current/dir/file <r 3>   10



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


[jira] Commented: (HADOOP-1665) DFS Trash feature bugs

Posted by "Gautam Kowshik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527306 ] 

Gautam Kowshik commented on HADOOP-1665:
----------------------------------------

I'v tested the  cases above.. both cases work fine.. 
one small observation that's not consistent with the comments above..
  bin/hadoop dfs -mkdir /dir
  bin/hadoop dfs -rmr /dir
    Moved to trash: /dir
  bin/hadoop dfs -mkdir /dir
  bin/hadoop dfs -rmr /dir
    Moved to trash: /dir
  bin/hadoop dfs -mkdir /dir
  bin/hadoop dfs -rmr /dir
    Moved to trash: /dir
  bin/hadoop dfs -lsr /Trash
  /Trash/Current  <dir>           2007-09-13 22:59
  /Trash/Current/dir      <dir>           2007-09-13 22:32
  /Trash/Current/dir.1    <dir>           2007-09-13 22:32
  /Trash/Current/dir.2    <dir>           2007-09-13 22:32

Note that the subsequent dirs were dir1, dir2 not dir.0, dir.1


> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Commented: (HADOOP-1665) DFS Trash feature bugs

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517646 ] 

Hairong Kuang commented on HADOOP-1665:
---------------------------------------

There is a subtle implication introduced by the above approach. Assume that /data is a directory, we execute the following command:
% hadoop dfs -rm /data   // /data is moved to /trash/data
// restore /data
%hadoop dfs -rm /data  // /data is moved to /trash/data.0
// restore /data
%hadoop dfs -rm /data/file1  // file1 is moved to /trash/data/file1.0

The most recent copy of file1 is at /trash/path/file1.0 not /trash/path.0/file1. So it is not obvious to the user which one is the most recent copy.

Also does it make to sense to decrease the replication factor of the files in the trash can to be 1 or 2?

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash2.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Updated: (HADOOP-1665) DFS Trash feature bugs

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

dhruba borthakur updated HADOOP-1665:
-------------------------------------

    Attachment:     (was: Trash2.patch)

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Updated: (HADOOP-1665) DFS Trash feature bugs

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

dhruba borthakur updated HADOOP-1665:
-------------------------------------

    Attachment:     (was: Trash.patch)

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash2.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Commented: (HADOOP-1665) DFS Trash feature bugs

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528143 ] 

Doug Cutting commented on HADOOP-1665:
--------------------------------------

> after the fs.trash.interval has elapsed.. the folders move from /Trash/Current/ to /Trash/[checkpoint_number]

Yes, that is as expected.  The checkpoint numbers are actually timestamps indicating the time of that move.  Folders whose checkpoint time is older than the trash interval are removed.

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Updated: (HADOOP-1665) DFS Trash feature bugs

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

dhruba borthakur updated HADOOP-1665:
-------------------------------------

    Attachment: Trash3.patch

Enhanced test to verify that files get created in the Trash directory when deleted.

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Commented: (HADOOP-1665) DFS Trash feature bugs

Posted by "Gautam Kowshik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527629 ] 

Gautam Kowshik commented on HADOOP-1665:
----------------------------------------

it's a minor thing that is possibly harmless.. just that the dir# starts with 1 instead of 0 as mentioned above. 

so as per us earlier comment the newer versions of the path would be path.0, path.1 and so on ..instead the behaviour shows versions starting from path.1, path.2 and so on. 

also, please confirm if this behaviour is as expected..
after the fs.trash.interval has elapsed.. the folders move from /Trash/Current/ to /Trash/[checkpoint_number]


> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Assigned: (HADOOP-1665) DFS Trash feature bugs

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

Nigel Daley reassigned HADOOP-1665:
-----------------------------------

    Assignee: dhruba borthakur  (was: Doug Cutting)

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Resolved: (HADOOP-1665) DFS Trash feature bugs

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

dhruba borthakur resolved HADOOP-1665.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.15.0

I just committed this.

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0, 0.15.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Commented: (HADOOP-1665) DFS Trash feature bugs

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517985 ] 

dhruba borthakur commented on HADOOP-1665:
------------------------------------------

I agree that the location of the file in /Trash might not be enough to determine the latest copy of the file. One can use the "last modification time" of the file to determine the latest copy of the file in Trash (this approach is not foolproof either). However, I think the most common cases are addressed by this patch.

I would hesitate to decrease the replication factor when it gets moved to Trash.

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash2.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Assigned: (HADOOP-1665) DFS Trash feature bugs

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

Nigel Daley reassigned HADOOP-1665:
-----------------------------------

    Assignee: Doug Cutting

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: Doug Cutting
>            Priority: Blocker
>             Fix For: 0.14.0
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Updated: (HADOOP-1665) DFS Trash feature bugs

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

dhruba borthakur updated HADOOP-1665:
-------------------------------------

    Attachment: Trash.patch

If the file already exists in Trash, then append an integer to the filename in the Trash directory. The newer versions of the file in Trash will be of the form path.0, path.1, path.2, etc.



> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: Doug Cutting
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Updated: (HADOOP-1665) DFS Trash feature bugs

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

dhruba borthakur updated HADOOP-1665:
-------------------------------------

    Attachment: Trash2.patch

A unit test to test deleting directories.

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash2.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Commented: (HADOOP-1665) DFS Trash feature bugs

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518183 ] 

Hairong Kuang commented on HADOOP-1665:
---------------------------------------

+1 The code looks good.

> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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


[jira] Commented: (HADOOP-1665) DFS Trash feature bugs

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527349 ] 

dhruba borthakur commented on HADOOP-1665:
------------------------------------------

Hi Gautam,

Can you pl explain ue latest comment? I thought the directories in /Trash were dir.1 dir.2, dir.3 as described in the doc. Is this confusing?



> DFS Trash feature bugs
> ----------------------
>
>                 Key: HADOOP-1665
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1665
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.13.1
>            Reporter: Nigel Daley
>            Assignee: dhruba borthakur
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: Trash3.patch
>
>
> In testing the DFS Trash feature, I've run across a couple of bugs.
> 1) Attempting to remove the same file fails when attempted within the same fs.trash.interval:
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     Moved to trash: /file
>     % bin/hadoop dfs -put file /file
>     % bin/hadoop dfs -rm /file
>     rm: Failed to move to trash: /file
> 2) Removing a file within a directory, followed by removing the directory creates a bizzare hierarchy within /Trash:
>     % bin/hadoop dfs -mkdir /dir
>     % bin/hadoop dfs -put file /dir/file
>     % bin/hadoop dfs -rm /dir/file
>     Moved to trash: /dir/file
>     % bin/hadoop dfs -rmr /dir
>     Moved to trash: /dir
>     % bin/hadoop dfs -lsr /Trash
>     /Trash/Current  <dir>
>     /Trash/Current/dir      <dir>
>     /Trash/Current/dir/dir  <dir>     <-- This is weird; potentially related to a rename case not fixed by HADOOP-1623 ???
>     /Trash/Current/dir/file <r 3>   10

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