Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6678

MiniDFSCluster may still be partially running after initialization fails.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.5.0
    • Fix Version/s: 2.6.0
    • Component/s: test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      MiniDFSCluster initializes the daemons (NameNodes, DataNodes) as part of object construction. If initialization fails, then the constructor throws an exception. When this happens, it's possible that daemons are left running in the background. There is effectively no way to clean up after this state, because the constructor failed, and therefore the caller has no way to trigger a shutdown.

      1. HDFS-6678.1.patch
        6 kB
        Chris Nauroth

        Activity

        Hide
        Chris Nauroth added a comment -

        The attached patch encloses MiniDFSCluster#initMiniDFSCluster in a try-finally. If the full initialization logic in the try block didn't complete successfully, then the finally block triggers a shutdown of anything that may have been left running. The patch looks bigger than that just because of changes in indentation.

        Show
        Chris Nauroth added a comment - The attached patch encloses MiniDFSCluster#initMiniDFSCluster in a try-finally. If the full initialization logic in the try block didn't complete successfully, then the finally block triggers a shutdown of anything that may have been left running. The patch looks bigger than that just because of changes in indentation.
        Hide
        Andrew Wang added a comment -

        +1 LGTM

        Show
        Andrew Wang added a comment - +1 LGTM
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12655601/HDFS-6678.1.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. There were no new javadoc warning messages.

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

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) 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-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.tools.TestDFSAdminWithHA
        org.apache.hadoop.hdfs.server.namenode.ha.TestPipelinesFailover

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7337//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7337//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/12655601/HDFS-6678.1.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 . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) 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-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.tools.TestDFSAdminWithHA org.apache.hadoop.hdfs.server.namenode.ha.TestPipelinesFailover +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/7337//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7337//console This message is automatically generated.
        Hide
        Chris Nauroth added a comment -

        Thank you for the code review, Andrew. I committed this to trunk and branch-2.

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

        The test failures are unrelated to this patch. I couldn't repro.

        Show
        Chris Nauroth added a comment - Thank you for the code review, Andrew. I committed this to trunk and branch-2. -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: The test failures are unrelated to this patch. I couldn't repro.
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #5880 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5880/)
        HDFS-6678. MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #5880 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5880/ ) HDFS-6678 . MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #613 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/613/)
        HDFS-6678. MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #613 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/613/ ) HDFS-6678 . MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #1805 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1805/)
        HDFS-6678. MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1805 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1805/ ) HDFS-6678 . MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1832 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1832/)
        HDFS-6678. MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1832 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1832/ ) HDFS-6678 . MiniDFSCluster may still be partially running after initialization fails. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1610549 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java

          People

          • Assignee:
            Chris Nauroth
            Reporter:
            Chris Nauroth
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development