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

Some coding improvement in SecondaryNameNode#main

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • namenode
    • None
    • Reviewed

    Description

      Two nits:

      1. The checking whether secondary is null is not necessary in the following code in SecondaryNameNode.java.
      2. The comment in this code seems to imply that "when secondary is not null, SNN was stared as a daemon.", and this is not true. Suggest to improve the comment to make it clear,

      Assign to Xiao since he worked on HDFS-3059. Thanks Xiao.

            if (secondary != null) {
              // The web server is only needed when starting SNN as a daemon,
              // and not needed if called from shell command. Starting the web server
              // from shell may fail when getting credentials, if the environment
              // is not set up for it, which is most of the case.
              secondary.startInfoServer();
      
              secondary.startCheckpointThread();
              secondary.join();
            }
      

      Attachments

        1. HDFS-9519.01.patch
          2 kB
          Xiao Chen
        2. HDFS-9519.02.patch
          1 kB
          Xiao Chen

        Issue Links

          Activity

            People

              xiaochen Xiao Chen
              yzhangal Yongjun Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: