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

FSImage file system image version check throw a (slightly) wrong parameter.

    XMLWordPrintableJSON

    Details

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

      Description

      Trivial error message issue:
      When upgrading hdfs, say from 2.0.5 to 2.2.0, users will need to start namenode with "upgrade" option.
      e.g.

      sudo service namenode upgrade
      

      That said, the actual error while without the option said "-upgrade" (with a hyphen)

      2014-03-13 23:38:15,488 FATAL org.apache.hadoop.hdfs.server.namenode.NameNode: Exception in namenode join
      java.io.IOException:
      File system image contains an old layout version -40.
      An upgrade to version -47 is required.
      Please restart NameNode with -upgrade option.
              at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:221)
              at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:787)
              at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:568)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:443)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:491)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:684)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:669)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1254)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1320)
      2014-03-13 23:38:15,492 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
      2014-03-13 23:38:15,493 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG:
      /************************************************************
      SHUTDOWN_MSG: Shutting down NameNode at nn1/192.168.2.202
      ************************************************************/
      ~
      

      I'm referring to 2.0.5 above,
      https://github.com/apache/hadoop-common/blob/branch-2.0.5/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java#L225

      I haven't tried the trunk but it seems to return "UPGRADE" (all upper case)
      which again anther slightly wrong error description.

      https://github.com/apache/hadoop-common/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java#L232

        Attachments

        1. HDFS-6103.patch
          0.9 kB
          Akira Ajisaka

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jaoki Jun Aoki
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: