Hadoop Common
  1. Hadoop Common
  2. HADOOP-4970

Use the full path when move files to .Trash/Current

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.19.0
    • Fix Version/s: 0.20.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Changed trash facility to use absolute path of the deleted file.

      Description

      When a directory or file is deleted using rm or rmr, the subtree is moved directly to .Trash/Current. If there are two deleted objects with the same name but with different original paths it is not feasible to undelete them without storing additional information regarding the original paths. Instead if the full path of the deleting object is used while moving (replicating the complete path in .Trash/Current) it will be easier to undelete objects to its original paths.

      1. hadoop-4970.patch
        3 kB
        Prasad Chakka
      2. hadoop-4970.2.patch
        4 kB
        Prasad Chakka

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Patch Available Patch Available Open Open
          21d 5h 2m 1 dhruba borthakur 28/Jan/09 07:05
          Open Open Patch Available Patch Available
          6d 18h 10m 2 Prasad Chakka 28/Jan/09 19:14
          Patch Available Patch Available Resolved Resolved
          1h 5m 1 dhruba borthakur 28/Jan/09 20:19
          Resolved Resolved Closed Closed
          84d 22h 58m 1 Nigel Daley 23/Apr/09 20:18
          Konstantin Shvachko made changes -
          Link This issue relates to HADOOP-6485 [ HADOOP-6485 ]
          Owen O'Malley made changes -
          Component/s dfs [ 12310710 ]
          Nigel Daley made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Robert Chansler made changes -
          Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
          Release Note Absolute path of the deleted file will be used while moving to trash to make undelete possible. Changed trash facility to use absolute path of the deleted file.
          Hide
          Robert Chansler added a comment -

          Edit release note for publication.

          Show
          Robert Chansler added a comment - Edit release note for publication.
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #756 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/756/ )
          dhruba borthakur made changes -
          Resolution Fixed [ 1 ]
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Incompatible change, Reviewed]
          Hide
          dhruba borthakur added a comment -

          I just committed this. Thanks Prasad!

          Show
          dhruba borthakur added a comment - I just committed this. Thanks Prasad!
          Prasad Chakka made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Prasad Chakka made changes -
          Attachment hadoop-4970.2.patch [ 12398918 ]
          Hide
          Prasad Chakka added a comment -

          ported to latest

          Show
          Prasad Chakka added a comment - ported to latest
          dhruba borthakur made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Fix Version/s 0.20.0 [ 12313438 ]
          Hide
          dhruba borthakur added a comment -

          Hi Prasad, can you pl upload a new patch? The current patch does not apply to trunk anymore. Sorry!

          Show
          dhruba borthakur added a comment - Hi Prasad, can you pl upload a new patch? The current patch does not apply to trunk anymore. Sorry!
          Hide
          Prasad Chakka added a comment -

          since 0.20 is not already released, it would be nice if you can put this in 0.20.

          Show
          Prasad Chakka added a comment - since 0.20 is not already released, it would be nice if you can put this in 0.20.
          Hide
          dhruba borthakur added a comment -

          I am going to commit this to trunk only. I would not pull this into 0.19 or 0.20 because it is kinda change in semantics.

          Show
          dhruba borthakur added a comment - I am going to commit this to trunk only. I would not pull this into 0.19 or 0.20 because it is kinda change in semantics.
          Hide
          Prasad Chakka added a comment -

          I ran 'ant -Djava5.home=/usr/local/jdk1.5.0_07 -Dforrest.home=/home/dhruba/forrest -Dfindbugs.home=/home/dhruba/findbugs test-patch -Dpatch.file=../hadoopcore/hadoop-4970.patch' and the output is below

          [exec] ======================================================================
          [exec] ======================================================================
          [exec] Running Eclipse classpath verification.
          [exec] ======================================================================
          [exec] ======================================================================
          [exec]
          [exec]
          [exec]
          [exec]
          [exec]
          [exec]
          [exec] +1 overall.
          [exec]
          [exec] +1 @author. The patch does not contain any @author tags.
          [exec]
          [exec] +1 tests included. The patch appears to include 3 new or modified tests.
          [exec]
          [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
          [exec]
          [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
          [exec]
          [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
          [exec]
          [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
          [exec]
          [exec]
          [exec]
          [exec]
          [exec] ======================================================================
          [exec] ======================================================================
          [exec] Finished build.
          [exec] ======================================================================
          [exec] ======================================================================

          Show
          Prasad Chakka added a comment - I ran 'ant -Djava5.home=/usr/local/jdk1.5.0_07 -Dforrest.home=/home/dhruba/forrest -Dfindbugs.home=/home/dhruba/findbugs test-patch -Dpatch.file=../hadoopcore/hadoop-4970.patch' and the output is below [exec] ====================================================================== [exec] ====================================================================== [exec] Running Eclipse classpath verification. [exec] ====================================================================== [exec] ====================================================================== [exec] [exec] [exec] [exec] [exec] [exec] [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity. [exec] [exec] [exec] [exec] [exec] ====================================================================== [exec] ====================================================================== [exec] Finished build. [exec] ====================================================================== [exec] ======================================================================
          Prasad Chakka made changes -
          Release Note Absolute path of the deleted file will be used while moving to trash to make undelete possible.
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          dhruba borthakur added a comment -

          +1 The code changes look good to me.

          Show
          dhruba borthakur added a comment - +1 The code changes look good to me.
          Prasad Chakka made changes -
          Attachment hadoop-4970.patch [ 12397225 ]
          Hide
          dhruba borthakur added a comment -

          +1 on this one.

          There could be some confusion when there are multiple paths to the same file (e.g. hard links), but since hdfs does not have hard-links, we can ignore that issue.

          Show
          dhruba borthakur added a comment - +1 on this one. There could be some confusion when there are multiple paths to the same file (e.g. hard links), but since hdfs does not have hard-links, we can ignore that issue.
          Hide
          Doug Cutting added a comment -

          This sounds reasonable to me.

          Show
          Doug Cutting added a comment - This sounds reasonable to me.
          Prasad Chakka made changes -
          Field Original Value New Value
          Link This issue blocks HIVE-141 [ HIVE-141 ]
          Prasad Chakka created issue -

            People

            • Assignee:
              Prasad Chakka
              Reporter:
              Prasad Chakka
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development