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

checkNNStartup() need to be called when fsck calls FSNamesystem.getSnapshottableDirs()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I looked further at HDFS-9231 change I reviewed earlier, and realize I missed one thing.

      The patch changed

            if (snapshottableDirs != null) {
              SnapshottableDirectoryStatus[] snapshotDirs = namenode.getRpcServer()
                  .getSnapshottableDirListing();
              if (snapshotDirs != null) {
                for (SnapshottableDirectoryStatus dir : snapshotDirs) {
                  snapshottableDirs.add(dir.getFullPath().toString());
                }
              }
            }
      

      to

            if (snapshottableDirs != null) {
              snapshottableDirs = namenode.getNamesystem().getSnapshottableDirs();
            }
      

      In old code, namenode.getRpcServer().getSnapshottableDirListing() calls checkNNStartup(), however, this is not done with the new code. This is a hole of the earlier HDFS-9231 patch.

      Create this jira to fix the hole. Suggest to revert this portion of the change, and add code to do what we need at NamenodeFsck.

      Sorry for missing this in my earlier review of HDFS-9231.

      Thanks.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xiaochen Xiao Chen
                Reporter:
                yzhangal Yongjun Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: