Hadoop Common
  1. Hadoop Common
  2. HADOOP-9108

Add a method to clear terminateCalled to ExitUtil for test cases

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.5
    • Fix Version/s: 0.23.6
    • Component/s: util
    • Labels:
      None

      Description

      Currently once terminateCalled is set, it will stay set since it's a class static variable. This can break test cases where multiple test cases run in one jvm. In MiniDfsCluster, it should be cleared during shutdown for the next test case to run properly.

        Issue Links

          Activity

          Kihwal Lee created issue -
          Kihwal Lee made changes -
          Field Original Value New Value
          Link This issue blocks HDFS-4233 [ HDFS-4233 ]
          Kihwal Lee made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Invalid [ 6 ]
          Hide
          Kihwal Lee added a comment -

          I found out the necessary changes have already been made in trunk and branch-2 by HDFS-3663 and HDFS-3765. But we cannot simply pull these patches to branch-0.23 because HDFS-3765 contains more than just ExitUtil change.

          I will use this jira to implement something equivalent for branch-0.23. Since this is for tests, a slight divergence should be of no concern.

          Show
          Kihwal Lee added a comment - I found out the necessary changes have already been made in trunk and branch-2 by HDFS-3663 and HDFS-3765 . But we cannot simply pull these patches to branch-0.23 because HDFS-3765 contains more than just ExitUtil change. I will use this jira to implement something equivalent for branch-0.23. Since this is for tests, a slight divergence should be of no concern.
          Kihwal Lee made changes -
          Resolution Invalid [ 6 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Kihwal Lee [ kihwal ]
          Kihwal Lee made changes -
          Affects Version/s 2.0.2-alpha [ 12322473 ]
          Target Version/s 3.0.0, 2.0.3-alpha, 0.23.6 [ 12320357, 12323273, 12323504 ] 0.23.6 [ 12323504 ]
          Hide
          Kihwal Lee added a comment -

          This is simplified version of what's in branch-2/trunk, where the terminateCalled has been replaced with exception record to show back trace. This patch does not include that change.

          I tested this with HDFS-4233.

          Show
          Kihwal Lee added a comment - This is simplified version of what's in branch-2/trunk, where the terminateCalled has been replaced with exception record to show back trace. This patch does not include that change. I tested this with HDFS-4233 .
          Kihwal Lee made changes -
          Attachment hadoop-9108.branch-0.23.patch [ 12555457 ]
          Kihwal Lee made changes -
          Status Reopened [ 4 ] Patch Available [ 10002 ]
          Hide
          Thomas Graves added a comment -

          +1 looks good, Thanks Kihwal!

          Show
          Thomas Graves added a comment - +1 looks good, Thanks Kihwal!
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12555457/hadoop-9108.branch-0.23.patch
          against trunk revision .

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1835//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/12555457/hadoop-9108.branch-0.23.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1835//console This message is automatically generated.
          Hide
          Thomas Graves added a comment -

          This patch only applies to branch-0.23, hence the jenkins failures. I committed it only to branch-0.23 since trunk and branch-2 already have similar functionality.

          Show
          Thomas Graves added a comment - This patch only applies to branch-0.23, hence the jenkins failures. I committed it only to branch-0.23 since trunk and branch-2 already have similar functionality.
          Thomas Graves made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 0.23.6 [ 12323504 ]
          Resolution Fixed [ 1 ]
          Hide
          Suresh Srinivas added a comment -

          +1 for the patch.

          Show
          Suresh Srinivas added a comment - +1 for the patch.
          Suresh Srinivas made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-0.23-Build #451 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/451/)
          HADOOP-9108. Add a method to clear terminateCalled to ExitUtil for test cases (Kihwal Lee via tgraves) (Revision 1415489)

          Result = UNSTABLE
          tgraves : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1415489
          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/util/ExitUtil.java
          • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #451 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/451/ ) HADOOP-9108 . Add a method to clear terminateCalled to ExitUtil for test cases (Kihwal Lee via tgraves) (Revision 1415489) Result = UNSTABLE tgraves : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1415489 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/util/ExitUtil.java /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          Gavin made changes -
          Link This issue blocks HDFS-4233 [ HDFS-4233 ]
          Gavin made changes -
          Link This issue is depended upon by HDFS-4233 [ HDFS-4233 ]

            People

            • Assignee:
              Kihwal Lee
              Reporter:
              Kihwal Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development