Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11717

Add unit test for HDFS-11709 StandbyCheckpointer should handle non-existing legacyOivImageDir gracefully

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.0, 2.7.4, 3.0.0-alpha4, 2.8.1
    • Fix Version/s: 2.9.0, 2.7.4, 3.0.0-alpha4, 2.8.2
    • Component/s: ha, namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      As a follow on to HDFS-11709 which made the StandbyCheckpointer more gracefully handle the situation that a legacy OIV image dir is misconfigured, write a unit test for it.

      1. HDFS-11717.000.patch
        2 kB
        Erik Krogen
      2. HDFS-11717.001.patch
        3 kB
        Erik Krogen
      3. HDFS-11717.002.patch
        3 kB
        Erik Krogen

        Issue Links

          Activity

          Hide
          xkrogen Erik Krogen added a comment - - edited

          Attaching patch which adds a unit test. Confirmed it fails without HDFS-11709.

          Zhe Zhang or Konstantin Shvachko, care to review?

          Show
          xkrogen Erik Krogen added a comment - - edited Attaching patch which adds a unit test. Confirmed it fails without HDFS-11709 . Zhe Zhang or Konstantin Shvachko , care to review?
          Hide
          shv Konstantin Shvachko added a comment -

          Erik, could you please explain what this has to do with EC policy? Wrong patch?
          I thought you would delete oiv dir or set restrictive permissions on it.

          Show
          shv Konstantin Shvachko added a comment - Erik, could you please explain what this has to do with EC policy? Wrong patch? I thought you would delete oiv dir or set restrictive permissions on it.
          Hide
          xkrogen Erik Krogen added a comment -

          Yes, very wrong patch. Sorry about that. Thanks for catching, Konstantin Shvachko. Uploaded the correct one.

          Show
          xkrogen Erik Krogen added a comment - Yes, very wrong patch. Sorry about that. Thanks for catching, Konstantin Shvachko . Uploaded the correct one.
          Hide
          shv Konstantin Shvachko added a comment -

          Erik, the test looks good.
          We should also probably change the LOG message of HDFS-11709 to warning() from error(). I think people should not write OIVs in production for performance reasons. So it is not an error to not configure oiv directory, rather a good practice. Besides similar log message in SecondaryNameNode is already a warning, so it will make checkpointers consistent with each other.
          Could you please add a description to this jira so that people would know what it is about without looking into HDFS-11709.

          Show
          shv Konstantin Shvachko added a comment - Erik, the test looks good. We should also probably change the LOG message of HDFS-11709 to warning() from error() . I think people should not write OIVs in production for performance reasons. So it is not an error to not configure oiv directory, rather a good practice. Besides similar log message in SecondaryNameNode is already a warning, so it will make checkpointers consistent with each other. Could you please add a description to this jira so that people would know what it is about without looking into HDFS-11709 .
          Hide
          xkrogen Erik Krogen added a comment -

          Konstantin Shvachko, this log message is only if both the OIV image directory is configured AND there is then an error while writing to that directory. Configuring to have no legacy OIV will not trigger this message. I think ERROR is appropriate here given that you've requested (via configuration) an OIV yet the system was unable to produce one (likely representing a misconfiguration or potentially disk issue).

          I will update the description.

          Show
          xkrogen Erik Krogen added a comment - Konstantin Shvachko , this log message is only if both the OIV image directory is configured AND there is then an error while writing to that directory. Configuring to have no legacy OIV will not trigger this message. I think ERROR is appropriate here given that you've requested (via configuration) an OIV yet the system was unable to produce one (likely representing a misconfiguration or potentially disk issue). I will update the description.
          Hide
          shv Konstantin Shvachko added a comment -

          Well if it is an error, then throwing exception would have been fine. But you want it to continue, which makes the log message a warning, imho.
          Anyways I am fine either way as long as the two warning message in StandbyCheckpointer and SecondaryNameNode related to the same condition are at least at the same logging level. Exactly the same would be ideal.

          Show
          shv Konstantin Shvachko added a comment - Well if it is an error, then throwing exception would have been fine. But you want it to continue, which makes the log message a warning, imho. Anyways I am fine either way as long as the two warning message in StandbyCheckpointer and SecondaryNameNode related to the same condition are at least at the same logging level. Exactly the same would be ideal.
          Hide
          xkrogen Erik Krogen added a comment -

          Okay, thank you for the discussion Konstantin Shvachko. I changed the log level to WARN.

          Show
          xkrogen Erik Krogen added a comment - Okay, thank you for the discussion Konstantin Shvachko . I changed the log level to WARN.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 14m 3s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 13m 0s trunk passed
          +1 compile 0m 50s trunk passed
          +1 checkstyle 0m 34s trunk passed
          +1 mvnsite 0m 53s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          -1 findbugs 1m 42s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings.
          +1 javadoc 0m 35s trunk passed
          +1 mvninstall 0m 42s the patch passed
          +1 compile 0m 39s the patch passed
          +1 javac 0m 39s the patch passed
          -0 checkstyle 0m 28s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 40 unchanged - 0 fixed = 41 total (was 40)
          +1 mvnsite 0m 47s the patch passed
          +1 mvneclipse 0m 11s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 50s the patch passed
          +1 javadoc 0m 39s the patch passed
          -1 unit 71m 4s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 17s The patch does not generate ASF License warnings.
          109m 44s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.namenode.TestStartup
            hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure
            hadoop.hdfs.server.namenode.TestMetadataVersionOutput
            hadoop.hdfs.web.TestWebHdfsTimeouts



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HDFS-11717
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12866013/HDFS-11717.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 09cb5dd7f53a 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / dcc292d
          Default Java 1.8.0_121
          findbugs v3.1.0-RC1
          findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/19271/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/19271/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/19271/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19271/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19271/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 14m 3s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 13m 0s trunk passed +1 compile 0m 50s trunk passed +1 checkstyle 0m 34s trunk passed +1 mvnsite 0m 53s trunk passed +1 mvneclipse 0m 13s trunk passed -1 findbugs 1m 42s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings. +1 javadoc 0m 35s trunk passed +1 mvninstall 0m 42s the patch passed +1 compile 0m 39s the patch passed +1 javac 0m 39s the patch passed -0 checkstyle 0m 28s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 40 unchanged - 0 fixed = 41 total (was 40) +1 mvnsite 0m 47s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 50s the patch passed +1 javadoc 0m 39s the patch passed -1 unit 71m 4s hadoop-hdfs in the patch failed. +1 asflicense 0m 17s The patch does not generate ASF License warnings. 109m 44s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.TestStartup   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure   hadoop.hdfs.server.namenode.TestMetadataVersionOutput   hadoop.hdfs.web.TestWebHdfsTimeouts Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-11717 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12866013/HDFS-11717.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 09cb5dd7f53a 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / dcc292d Default Java 1.8.0_121 findbugs v3.1.0-RC1 findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/19271/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/19271/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/19271/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19271/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19271/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          xkrogen Erik Krogen added a comment - - edited

          Fixed the minor checkstyle warning in v002 patch... TestMetadataVersionOutput / TestStartup are existing failures tracked in HADOOP-14368. TestDataNodeVolumeFailure seems unrelated; passes fine locally.

          Show
          xkrogen Erik Krogen added a comment - - edited Fixed the minor checkstyle warning in v002 patch... TestMetadataVersionOutput / TestStartup are existing failures tracked in HADOOP-14368 . TestDataNodeVolumeFailure seems unrelated; passes fine locally.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 14s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 14m 48s trunk passed
          +1 compile 0m 58s trunk passed
          +1 checkstyle 0m 41s trunk passed
          +1 mvnsite 1m 2s trunk passed
          +1 mvneclipse 0m 16s trunk passed
          -1 findbugs 1m 48s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings.
          +1 javadoc 0m 45s trunk passed
          +1 mvninstall 0m 54s the patch passed
          +1 compile 0m 55s the patch passed
          +1 javac 0m 55s the patch passed
          +1 checkstyle 0m 35s the patch passed
          +1 mvnsite 0m 57s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 54s the patch passed
          +1 javadoc 0m 39s the patch passed
          -1 unit 75m 18s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 19s The patch does not generate ASF License warnings.
          103m 44s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA
            hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation
            hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting
            hadoop.hdfs.server.namenode.TestStartup
            hadoop.hdfs.server.namenode.TestMetadataVersionOutput



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HDFS-11717
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12866067/HDFS-11717.002.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 3b1e1fca3c43 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / cedaf4c
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/19281/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/19281/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19281/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19281/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 14s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 14m 48s trunk passed +1 compile 0m 58s trunk passed +1 checkstyle 0m 41s trunk passed +1 mvnsite 1m 2s trunk passed +1 mvneclipse 0m 16s trunk passed -1 findbugs 1m 48s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings. +1 javadoc 0m 45s trunk passed +1 mvninstall 0m 54s the patch passed +1 compile 0m 55s the patch passed +1 javac 0m 55s the patch passed +1 checkstyle 0m 35s the patch passed +1 mvnsite 0m 57s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 54s the patch passed +1 javadoc 0m 39s the patch passed -1 unit 75m 18s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 103m 44s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA   hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting   hadoop.hdfs.server.namenode.TestStartup   hadoop.hdfs.server.namenode.TestMetadataVersionOutput Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-11717 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12866067/HDFS-11717.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 3b1e1fca3c43 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / cedaf4c Default Java 1.8.0_131 findbugs v3.1.0-RC1 findbugs https://builds.apache.org/job/PreCommit-HDFS-Build/19281/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html unit https://builds.apache.org/job/PreCommit-HDFS-Build/19281/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19281/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19281/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          shv Konstantin Shvachko added a comment -

          +1 tests are passing locally except the two tracked in HADOOP-14368.

          Show
          shv Konstantin Shvachko added a comment - +1 tests are passing locally except the two tracked in HADOOP-14368 .
          Hide
          shv Konstantin Shvachko added a comment -

          Just committed this to four branches. Thank you Erik Krogen.

          Show
          shv Konstantin Shvachko added a comment - Just committed this to four branches. Thank you Erik Krogen .
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11677 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11677/)
          HDFS-11717. Add unit test for HDFS-11709 StandbyCheckpointer should (shv: rev d9014bda93760f223789d2ec9f5e35f40de157d4)

          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyCheckpointer.java
          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11677 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11677/ ) HDFS-11717 . Add unit test for HDFS-11709 StandbyCheckpointer should (shv: rev d9014bda93760f223789d2ec9f5e35f40de157d4) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyCheckpointer.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java

            People

            • Assignee:
              xkrogen Erik Krogen
              Reporter:
              xkrogen Erik Krogen
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development