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

The 2NN incorrectly daemonizes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.23.0, 2.0.0-alpha
    • Fix Version/s: None
    • Component/s: namenode
    • Labels:

      Description

      The SecondaryNameNode (and Checkpointer) confuse o.a.h.u.Daemon with a Unix daemon. Per below it intends to create a thread that never ends, but o.a.h.u.Daemon just marks a thread with Java's Thread#setDaemon which means Java will terminate the thread when there are no more non-daemon user threads running

          // Create a never ending deamon
          Daemon checkpointThread = new Daemon(secondary);
      

      Perhaps they thought they were using commons Daemon. We of course don't want the 2NN to exit unless it exits itself or is stopped explicitly. Currently it won't do this because the main thread is not marked as a daemon thread. In any case, let's make the 2NN consistent with the NN in this regard (exit when the RPC thread exits).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                eli2 Eli Collins
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: