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.2.patch
        4 kB
        Prasad Chakka
      2. hadoop-4970.patch
        3 kB
        Prasad Chakka

        Issue Links

          Activity

          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/ )
          Hide
          dhruba borthakur added a comment -

          I just committed this. Thanks Prasad!

          Show
          dhruba borthakur added a comment - I just committed this. Thanks Prasad!
          Hide
          Prasad Chakka added a comment -

          ported to latest

          Show
          Prasad Chakka added a comment - ported to latest
          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] ======================================================================
          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.
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development