Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4208

NameNode could be stuck in SafeMode due to never-created blocks

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.1.2
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      In one test case, NameNode allocated a block and then was killed before the client got the addBlock response. After NameNode restarted, it couldn't get out of SafeMode waiting for the block which was never created. In trunk, NameNode can get out of SafeMode since it only counts complete blocks. However branch-1 doesn't have the clear notion of under-constructioned-block in Namenode.

      JIRA HDFS-4212 is to track the never-created-block issue and this JIRA is to fix NameNode in branch-1 so it can get out of SafeMode when never-created-block exists.

      The proposed idea is for SafeMode not to count the zero-sized last block in an under-construction file as part of total blcok count.

      1. HDFS-4208.branch-1.patch
        4 kB
        Brandon Li
      2. HDFS-4208.branch-1.patch
        5 kB
        Brandon Li
      3. HDFS-4208.branch-1.patch
        6 kB
        Brandon Li

        Issue Links

          Activity

          Brandon Li created issue -
          Brandon Li made changes -
          Field Original Value New Value
          Summary backport HDFS-636 to branch-1: SafeMode should count only complete blocks.  SafeMode should count only complete blocks in branch-1
          Brandon Li made changes -
          Description backport HDFS-636 to branch-1: SafeMode should count only complete blocks. As in trunk, SafeMode should count only complete blocks in branch-1.
          Brandon Li made changes -
          Attachment HDFS-4208.branch-1.patch [ 12554295 ]
          Brandon Li made changes -
          Summary  SafeMode should count only complete blocks in branch-1 NameNode could be stuck in SafeMode due to incomplete blocks in branch-1
          Brandon Li made changes -
          Description As in trunk, SafeMode should count only complete blocks in branch-1. In one test case, NameNode allocated a block and then was killed before the client got the addBlock response. After NameNode restarted, it couldn't get out of SafeMode waiting for the block which was never created. In trunk, NameNode can get out of SafeMode since it only counts complete blocks. However branch-1 doesn't have the clear notion of under-constructioned-block in Namenode.

          JIRA HDFS-4212 is to track the never-created-block issue and this JIRA is to fix NameNode in branch-1 so it can get out of SafeMode when never-created-block exists.

          The proposed idea is for SafeMode not to count the zero-size last block in a under-construction file as part of total blcok count.
          Brandon Li made changes -
          Summary NameNode could be stuck in SafeMode due to incomplete blocks in branch-1 NameNode could be stuck in SafeMode due to never-created blocks in branch-1
          Brandon Li made changes -
          Link This issue relates to HDFS-4212 [ HDFS-4212 ]
          Brandon Li made changes -
          Description In one test case, NameNode allocated a block and then was killed before the client got the addBlock response. After NameNode restarted, it couldn't get out of SafeMode waiting for the block which was never created. In trunk, NameNode can get out of SafeMode since it only counts complete blocks. However branch-1 doesn't have the clear notion of under-constructioned-block in Namenode.

          JIRA HDFS-4212 is to track the never-created-block issue and this JIRA is to fix NameNode in branch-1 so it can get out of SafeMode when never-created-block exists.

          The proposed idea is for SafeMode not to count the zero-size last block in a under-construction file as part of total blcok count.
          In one test case, NameNode allocated a block and then was killed before the client got the addBlock response. After NameNode restarted, it couldn't get out of SafeMode waiting for the block which was never created. In trunk, NameNode can get out of SafeMode since it only counts complete blocks. However branch-1 doesn't have the clear notion of under-constructioned-block in Namenode.

          JIRA HDFS-4212 is to track the never-created-block issue and this JIRA is to fix NameNode in branch-1 so it can get out of SafeMode when never-created-block exists.

          The proposed idea is for SafeMode not to count the zero-sized last block in an under-construction file as part of total blcok count.
          Brandon Li made changes -
          Attachment HDFS-4208.branch-1.patch [ 12554431 ]
          Brandon Li made changes -
          Attachment HDFS-4208.branch-1.patch [ 12554541 ]
          Suresh Srinivas made changes -
          Summary NameNode could be stuck in SafeMode due to never-created blocks in branch-1 NameNode could be stuck in SafeMode due to never-created blocks
          Suresh Srinivas made changes -
          Affects Version/s 1.0.0 [ 12318243 ]
          Affects Version/s 1.2.0 [ 12321657 ]
          Priority Major [ 3 ] Critical [ 2 ]
          Suresh Srinivas made changes -
          Affects Version/s 1.1.0 [ 12317959 ]
          Affects Version/s 1.0.0 [ 12318243 ]
          Suresh Srinivas made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Target Version/s 1.1.1 [ 12321656 ]
          Fix Version/s 1.1.1 [ 12321656 ]
          Resolution Fixed [ 1 ]
          Suresh Srinivas made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Suresh Srinivas made changes -
          Fix Version/s 1.1.1 [ 12321656 ]
          Suresh Srinivas made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s 1.2.0 [ 12321657 ]
          Resolution Fixed [ 1 ]
          Suresh Srinivas made changes -
          Fix Version/s 1.1.2 [ 12323593 ]
          Target Version/s 1.1.1 [ 12321656 ] 1.1.2 [ 12323593 ]
          Matt Foley made changes -
          Fix Version/s 1.2.0 [ 12321657 ]
          Konstantin Shvachko made changes -
          Link This issue is related to HDFS-4452 [ HDFS-4452 ]
          Matt Foley made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Brandon Li
              Reporter:
              Brandon Li
            • Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development