hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Templeton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2896) The 2NN incorrectly daemonizes
Date Wed, 26 Aug 2015 20:17:46 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14715439#comment-14715439

Daniel Templeton commented on HDFS-2896:

The comment in the 2NN that the checkpoint thread should never end has been removed, presumably
as it's no longer relevant.  The checkpoint thread is still a daemon thread, but since the
main thread joins on the checkpoint thread, I don't see where it impacts anything.  The 2NN
appears to now be consistent with the NN: in both, the main method launches a thread and then
joins it.

Sounds like this JIRA was a causality of HDFS-4426.  Anyone against closing it?

> The 2NN incorrectly daemonizes
> ------------------------------
>                 Key: HDFS-2896
>                 URL: https://issues.apache.org/jira/browse/HDFS-2896
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 0.23.0, 2.0.0-alpha
>            Reporter: Eli Collins
>              Labels: newbie
> 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
> {code}
>     // Create a never ending deamon
>     Daemon checkpointThread = new Daemon(secondary);
> {code}
> 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).

This message was sent by Atlassian JIRA

View raw message