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

When dfs.namenode.safemode.min.datanodes is configured there is a mismatch in UI report

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0.0-alpha, 3.0.0-alpha1
    • Fix Version/s: None
    • Component/s: namenode
    • Labels:

      Description

      Scenario 1:
      step 1: dfs.namenode.safemode.min.datanodes =2 in hdfs-site.xml
      step 2: start NN
      Since the datanode threshold is 2 until 2 DN is up NN will not come out of safemode.

      •But in UI report always displays that need additionally (datanodeThreshold - numLive) + 1 . which can be avoided.
      •And "Safe mode will be turned off automatically." message is not required. because only if the required DN is up it will be turned off
      UI report
      =========
      "Safe mode is ON. The number of live datanodes 0 needs an additional 3 live datanodes to reach the minimum number 2. Safe mode will be turned off automatically."

      Scenario :2
      configuring to interger.max value : dfs.namenode.safemode.min.datanodes =2147483647
      UI report
      ========
      "Safe mode is ON. The number of live datanodes 0 needs an additional -2147483648 live datanodes to reach the minimum number 2147483647. Safe mode will be turned off automatically."

      NN logs:
      ========

      2012-04-24 19:09:33,181 INFO org.apache.hadoop.hdfs.StateChange: STATE* Safe mode ON.
      The number of live datanodes 0 needs an additional -2147483648 live datanodes to reach the minimum number 2147483647. Safe mode will be turned off automatically.
      Code:
      =====

      if (numLive < datanodeThreshold) {
                if (!"".equals(msg)) {
                  msg += "\n";
                }
                msg += String.format(
                  "The number of live datanodes %d needs an additional %d live "
                  + "datanodes to reach the minimum number %d.",
                  numLive, (datanodeThreshold - numLive) + 1 , datanodeThreshold);
              }
      

      instead of (datanodeThreshold - numLive) + 1 it can be (datanodeThreshold - numLive).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andreina J.Andreina
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: