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

Add a new option to NN upgrade to terminate the process after upgrade on NN is completed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0, 3.0.0-alpha1
    • 2.6.0
    • namenode
    • None
    • Reviewed
    • namenode upgrade force

    Description

      Currently when namenode is started for upgrade (hadoop namenode -upgrade command), after finishing upgrade of metadata, namenode starts working normally and wait for datanodes to upgrade itself and connect to to NN. We need to have option for upgrading only NN metadata, so after upgrade is finished on NN, process should terminate.

      I have tested it by changing in file: hdfs.server.namenode.NameNode.java, method: public static NameNode createNameNode(String argv[], Configuration conf):
      in switch added
      case UPGRADE:
      case UPGRADE:
      {
      DefaultMetricsSystem.initialize("NameNode");
      NameNode nameNode = new NameNode(conf);
      if (startOpt.getForceUpgrade())

      { terminate(0); return null; }

      return nameNode;
      }
      This did upgrade of metadata, closed process after finished, and later when all services were started, upgrade of datanodes finished sucessfully and system run .

      What I'm suggesting right now is to add new startup parameter "-force", so namenode can be started like this "hadoop namenode -upgrade -force", so we can indicate that we want to terminate process after upgrade metadata on NN is finished. Old functionality should be preserved, so users can run "hadoop namenode -upgrade" on same way and with same behaviour as it was previous.

      Thanks,
      Danilo

      Attachments

        1. HDFS-6597.06.patch
          10 kB
          Danilo Vunjak
        2. HDFS-6597.05.patch
          10 kB
          Danilo Vunjak
        3. HDFS-6597.04.patch
          14 kB
          Danilo Vunjak
        4. JIRA-HDFS-6597.03.patch
          14 kB
          Danilo Vunjak
        5. JIRA-HDFS-6597.02.patch
          8 kB
          Danilo Vunjak
        6. JIRA-HDFS-6597.patch
          2 kB
          Danilo Vunjak
        7. JIRA-HDFS-30.patch
          9 kB
          Danilo Vunjak

        Activity

          People

            dvunjak Danilo Vunjak
            dvunjak Danilo Vunjak
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: