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: Patch Available
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.20.204.0, 0.20.205.0, 1.1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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.patch
        1 kB
        Steve Loughran

        Issue Links

          Activity

          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
          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 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
          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 -

          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
          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.

            People

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

              Dates

              • Created:
                Updated:

                Time Tracking

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

                  Development