Hadoop Common
  1. Hadoop Common
  2. HADOOP-5650

Namenode log that indicates why it is not leaving safemode may be confusing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      A namenode with a large number of datablocks is setup with dfs.safemode.threshold.pct set to 1.0. With a small number of unreported blocks, namenode prints the following as the reason for not leaving safe mode:
      The ratio of reported blocks 1.0000 has not reached the threshold 1.0000

      With a large number of blocks, precision used for printing the log may not indicate the difference between the actual ratio of safe blocks to total blocks and the configured threshold. Printing number of blocks instead of ratio will improve the clarity.

      1. 5650.patch
        4 kB
        Suresh Srinivas
      2. 5650.patch
        4 kB
        Suresh Srinivas

        Activity

        Hide
        Suresh Srinivas added a comment -

        The text in Namenode UI, logs and text in SafeModeException are changed as follows:

        • Old: The ratio of reported blocks 0.0000 has not reached the threshold 1.0000. Safe mode will be turned off automatically.
        • New: The reported blocks 0 needs additional 5176 blocks to reach the threshold 1.0000 of total blocks 5176. Safe mode will be turned off automatically.
        • Old: The ratio of reported blocks 2.0000 has reached the threshold 1.0000. Safe mode will be turned off automatically in 29 seconds.
        • New: The reported blocks 5176 has reached the threshold 1.0000 of total blocks 5176. Safe mode will be turned off automatically in 29 seconds.
        Show
        Suresh Srinivas added a comment - The text in Namenode UI, logs and text in SafeModeException are changed as follows: Old: The ratio of reported blocks 0.0000 has not reached the threshold 1.0000. Safe mode will be turned off automatically. New: The reported blocks 0 needs additional 5176 blocks to reach the threshold 1.0000 of total blocks 5176. Safe mode will be turned off automatically. Old: The ratio of reported blocks 2.0000 has reached the threshold 1.0000. Safe mode will be turned off automatically in 29 seconds. New: The reported blocks 5176 has reached the threshold 1.0000 of total blocks 5176. Safe mode will be turned off automatically in 29 seconds.
        Hide
        dhruba borthakur added a comment -

        This fix will be immensely helpful!

        Show
        dhruba borthakur added a comment - This fix will be immensely helpful!
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good.

        A nit: seems to me that the following is more clear.

            boolean needEnter() {
              return threshold != 0 && blockSafe < blockThreshold;
            }
        
        Show
        Tsz Wo Nicholas Sze added a comment - +1 patch looks good. A nit: seems to me that the following is more clear. boolean needEnter() { return threshold != 0 && blockSafe < blockThreshold; }
        Hide
        Suresh Srinivas added a comment -

        Incorporating changes suggested by Nicholas

        Show
        Suresh Srinivas added a comment - Incorporating changes suggested by Nicholas
        Hide
        Hadoop QA added a comment -

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

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        -1 contrib tests. The patch failed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/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/12405479/5650.patch against trunk revision 765713. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/202/console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        No unit tests added since this is mainly change in how the message is printed in the logs and UI. The testcases below are failing for other tests previously run by Hudson. (For example it happened for 5589):
        org.apache.hadoop.mapred.TestQueueCapacities.testSingleQueue
        org.apache.hadoop.mapred.TestQueueCapacities.testSingleQueueMultipleJobs
        org.apache.hadoop.mapred.TestQueueCapacities.testMultipleQueues
        org.apache.hadoop.mapred.TestTaskFail.testWithDFS
        org.apache.hadoop.mapred.TestMRServerPorts.testJobTrackerPorts
        org.apache.hadoop.mapred.TestMRServerPorts.testTaskTrackerPorts

        Show
        Suresh Srinivas added a comment - No unit tests added since this is mainly change in how the message is printed in the logs and UI. The testcases below are failing for other tests previously run by Hudson. (For example it happened for 5589): org.apache.hadoop.mapred.TestQueueCapacities.testSingleQueue org.apache.hadoop.mapred.TestQueueCapacities.testSingleQueueMultipleJobs org.apache.hadoop.mapred.TestQueueCapacities.testMultipleQueues org.apache.hadoop.mapred.TestTaskFail.testWithDFS org.apache.hadoop.mapred.TestMRServerPorts.testJobTrackerPorts org.apache.hadoop.mapred.TestMRServerPorts.testTaskTrackerPorts
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have committed this. Thanks, Suresh!

        Show
        Tsz Wo Nicholas Sze added a comment - I have committed this. Thanks, Suresh!
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk #811 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/811/)
        . Fix safemode messages in the Namenode log. Contributed by Suresh Srinivas

        Show
        Hudson added a comment - Integrated in Hadoop-trunk #811 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/811/ ) . Fix safemode messages in the Namenode log. Contributed by Suresh Srinivas

          People

          • Assignee:
            Suresh Srinivas
            Reporter:
            Suresh Srinivas
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development