Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-49

MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.20.204.0, 0.20.205.0, 1.1.0
    • Fix Version/s: 2.7.0
    • Component/s: test
    • Labels:
    • Target Version/s:

      Description

      The stopDataNode method will shut down the last node in the list of nodes, if one matching a specific name is not found

      This is possibly not what was intended. Better to return false or fail in some other manner if the named node was not located

      synchronized boolean stopDataNode(String name) {
      int i;
      for (i = 0; i < dataNodes.size(); i++) {
      DataNode dn = dataNodes.get.datanode;
      if (dn.dnRegistration.getName().equals(name))

      { break; }

      }
      return stopDataNode;
      }

      1. HDFS-49-002.patch
        2 kB
        Steve Loughran
      2. hdfs-49.patch
        1 kB
        Steve Loughran

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #821 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/821/)
          HDFS-49. MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #821 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/821/ ) HDFS-49 . MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #87 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/87/)
          HDFS-49. MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • 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-Java8 #87 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/87/ ) HDFS-49 . MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #87 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/87/)
          HDFS-49. MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #87 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/87/ ) HDFS-49 . MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          Hide
          Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk #2018 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2018/)
          HDFS-49. MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          Show
          Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #2018 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2018/ ) HDFS-49 . MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2037 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2037/)
          HDFS-49. MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2037 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2037/ ) HDFS-49 . MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #83 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/83/)
          HDFS-49. MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #83 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/83/ ) HDFS-49 . MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #6937 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6937/)
          HDFS-49. MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #6937 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6937/ ) HDFS-49 . MiniDFSCluster.stopDataNode will always shut down a node in the cluster if a matching name is not found. (stevel) (stevel: rev 0da53a37ec46b887f441df98c6986b31fa7671a2) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12667794/HDFS-49-002.patch
          against trunk revision 6f9fe76.

          +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9335//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9335//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/12667794/HDFS-49-002.patch against trunk revision 6f9fe76. +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9335//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9335//console This message is automatically generated.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12667794/HDFS-49-002.patch
          against trunk revision 1f2b695.

          +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.TestSafeMode
          org.apache.hadoop.hdfs.server.datanode.TestBlockScanner

          The following test timeouts occurred in hadoop-hdfs-project/hadoop-hdfs:

          org.apache.hadoop.hdfs.server.namenode.ha.TestStandbyCheckpoints

          Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9332//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9332//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/12667794/HDFS-49-002.patch against trunk revision 1f2b695. +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.TestSafeMode org.apache.hadoop.hdfs.server.datanode.TestBlockScanner The following test timeouts occurred in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.namenode.ha.TestStandbyCheckpoints Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9332//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9332//console This message is automatically generated.
          Hide
          Arpit Agarwal added a comment -

          +1 for the v002 patch. The test failures are almost certainly unrelated.

          Show
          Arpit Agarwal added a comment - +1 for the v002 patch. The test failures are almost certainly unrelated.
          Hide
          Ravi Prakash added a comment -

          Patch looks good to me however the two test failures should probably be fixed too. The testReport has probably been deleted from the Jenkins workspace, so I'll just cancel and submit patch once again in the hopes that jenkins will run again.

          Show
          Ravi Prakash added a comment - Patch looks good to me however the two test failures should probably be fixed too. The testReport has probably been deleted from the Jenkins workspace, so I'll just cancel and submit patch once again in the hopes that jenkins will run again.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12667794/HDFS-49-002.patch
          against trunk revision b67d5ba.

          +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.web.TestWebHdfsFileSystemContract
          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/7985//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7985//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/12667794/HDFS-49-002.patch against trunk revision b67d5ba. +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.web.TestWebHdfsFileSystemContract 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/7985//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7985//console This message is automatically generated.
          Hide
          Steve Loughran added a comment -

          patch 002, applies to trunk

          Show
          Steve Loughran added a comment - patch 002, applies to trunk
          Hide
          Allen Wittenauer added a comment -

          Rebase it and we'll get it committed.

          Show
          Allen Wittenauer added a comment - Rebase it and we'll get it committed.
          Hide
          Steve Loughran added a comment -
          Show
          Steve Loughran added a comment - nope, Still There
          Hide
          Hadoop QA added a comment -

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

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

          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7388//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/12494635/hdfs-49.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/7388//console This message is automatically generated.
          Hide
          Allen Wittenauer added a comment -

          I bet this is a stale jira...

          Show
          Allen Wittenauer added a comment - I bet this is a stale jira...
          Hide
          Hadoop QA added a comment -

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

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

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

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

          Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1253//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/12494635/hdfs-49.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1253//console This message is automatically generated.
          Hide
          Steve Loughran added a comment -

          Also used in org.apache.hadoop.hdfs.server.namenode.TestNodeCount

          Show
          Steve Loughran added a comment - Also used in org.apache.hadoop.hdfs.server.namenode.TestNodeCount
          Hide
          Steve Loughran added a comment -

          No test for this, it was obvious from a code review, and so is the patch

          Show
          Steve Loughran added a comment - No test for this, it was obvious from a code review, and so is the patch
          Hide
          Steve Loughran added a comment -

          patch for this, relies on stopDataNode(int) handing negative index values

          Show
          Steve Loughran added a comment - patch for this, relies on stopDataNode(int) handing negative index values
          Hide
          Tsz Wo Nicholas Sze added a comment -

          The problem may cause HADOOP-4278.

          Show
          Tsz Wo Nicholas Sze added a comment - The problem may cause HADOOP-4278 .
          Hide
          steve_l added a comment -

          marking as minor; the method is only used in TestDatanodeDeath

          Show
          steve_l added a comment - marking as minor; the method is only used in TestDatanodeDeath

            People

            • Assignee:
              Steve Loughran
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development