Hadoop Common
  1. Hadoop Common
  2. HADOOP-8843

Old trash directories are never deleted on upgrade from 1.x

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.23.3, 2.0.2-alpha
    • Fix Version/s: 3.0.0, 0.23.4, 2.0.3-alpha
    • Component/s: None
    • Labels:
      None

      Description

      The older format of the trash checkpoint for 1.x is yyMMddHHmm the new format is yyMMddHHmmss(-\d+)? so if you upgrade from an old cluster to a new one, all of the entires in .trash will never be deleted because they currently are always ignored on deletion.

      We should support deleting the older format as well.

      1. HADOOP-8843.patch
        4 kB
        Jason Lowe
      2. HADOOP-8843.patch
        4 kB
        Jason Lowe

        Activity

        Hide
        Suresh Srinivas added a comment -

        Marking the bug as critical.

        Show
        Suresh Srinivas added a comment - Marking the bug as critical.
        Hide
        Jason Lowe added a comment -

        Moved to HADOOP since this is an issue in TrashPolicyDefault. It needs to look for the old format when parsing checkpoints for timestamps.

        Show
        Jason Lowe added a comment - Moved to HADOOP since this is an issue in TrashPolicyDefault. It needs to look for the old format when parsing checkpoints for timestamps.
        Hide
        Jason Lowe added a comment -

        Patch to update TrashPolicyDefault so it checks for the old checkpoint format if parsing the new format fails.

        Show
        Jason Lowe added a comment - Patch to update TrashPolicyDefault so it checks for the old checkpoint format if parsing the new format fails.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12546589/HADOOP-8843.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1520//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1520//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12546589/HADOOP-8843.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1520//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1520//console This message is automatically generated.
        Hide
        Todd Lipcon added a comment -

        Looks good to me, except for one small nit: it would be worth a javadoc comment on OLD_CHECKPOINT saying something like: /** Format of checkpoint directories used prior to Hadoop 0.23. */ and then a small comment at the point where it's used, like // Check for old-style checkpoint directories left over after an upgrade from Hadoop 1.x

        Otherwise I think people may be confused what "old" refers to, a few years down the line.

        Show
        Todd Lipcon added a comment - Looks good to me, except for one small nit: it would be worth a javadoc comment on OLD_CHECKPOINT saying something like: /** Format of checkpoint directories used prior to Hadoop 0.23. */ and then a small comment at the point where it's used, like // Check for old-style checkpoint directories left over after an upgrade from Hadoop 1.x Otherwise I think people may be confused what "old" refers to, a few years down the line.
        Hide
        Jason Lowe added a comment -

        Thanks for the review, Todd. Updated the patch accordingly.

        Show
        Jason Lowe added a comment - Thanks for the review, Todd. Updated the patch accordingly.
        Hide
        Todd Lipcon added a comment -

        +1, I'll let you have the honor of committing it yourself

        Show
        Todd Lipcon added a comment - +1, I'll let you have the honor of committing it yourself
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12546604/HADOOP-8843.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common:

        org.apache.hadoop.ha.TestZKFailoverController

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1521//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1521//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12546604/HADOOP-8843.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-common-project/hadoop-common: org.apache.hadoop.ha.TestZKFailoverController +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1521//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1521//console This message is automatically generated.
        Hide
        Jason Lowe added a comment -

        Thanks, Todd. Pushing this in.

        Show
        Jason Lowe added a comment - Thanks, Todd. Pushing this in.
        Hide
        Jason Lowe added a comment -

        I committed this to trunk, branch-2, and branch-0.23.

        Show
        Jason Lowe added a comment - I committed this to trunk, branch-2, and branch-0.23.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2777 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2777/)
        HADOOP-8843. Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616)

        Result = SUCCESS
        jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2777 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2777/ ) HADOOP-8843 . Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616) Result = SUCCESS jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2840 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2840/)
        HADOOP-8843. Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616)

        Result = SUCCESS
        jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2840 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2840/ ) HADOOP-8843 . Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616) Result = SUCCESS jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2799 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2799/)
        HADOOP-8843. Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616)

        Result = ABORTED
        jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2799 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2799/ ) HADOOP-8843 . Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616) Result = ABORTED jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #387 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/387/)
        svn merge -c 1390616 to fix HADOOP-8843. Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390623)

        Result = UNSTABLE
        jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390623
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #387 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/387/ ) svn merge -c 1390616 to fix HADOOP-8843 . Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390623) Result = UNSTABLE jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390623 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1178 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1178/)
        HADOOP-8843. Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616)

        Result = SUCCESS
        jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1178 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1178/ ) HADOOP-8843 . Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616) Result = SUCCESS jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1209 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1209/)
        HADOOP-8843. Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616)

        Result = SUCCESS
        jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1209 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1209/ ) HADOOP-8843 . Old trash directories are never deleted on upgrade from 1.x. Contributed by Jason Lowe (Revision 1390616) Result = SUCCESS jlowe : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1390616 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java

          People

          • Assignee:
            Jason Lowe
            Reporter:
            Robert Joseph Evans
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development