hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron T. Myers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3507) DFS#isInSafeMode needs to execute only on Active NameNode
Date Fri, 17 Aug 2012 23:18:38 GMT

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

Aaron T. Myers commented on HDFS-3507:
--------------------------------------

My preference is to introduce a new isInSafeMode or getSafeMode function to the ClientProtocol,
instead of parameterizing the check. I've always found it a little bizarre that a method called
"setSafeMode" actually may not set anything, and may be non-mutative depending upon a parameter.
I don't feel super strongly about this, though. Nicholas, is there some reason you prefer
keeping this as a single method?

Two comments on the correctness of the patch:

# The new parameter in the SetSafeModeRequestProto should be marked optional, defaulted to
false, to maintain compatibility.
# Seems like the calls in DFSAdmin should be passing "true" for isChecked, so that the the
active NN is used.

Another issue related to this: I'm not super happy with the current handling of setting (not
getting) safemode in an HA setup, since an admin command will only affect a single NN. Imagine
the scenario where an operator runs `hdfs dfsadmin -safemode enter' and then a failure occurs
of the active NN, triggering a failover. Presently, this will have the side effect of causing
HDFS to leave safe mode. I think when an operator calls `safemode -enter' they usually intend
to put the HDFS _service_ into safemode, and not any particular NN. Perhaps we should make
the the DFSAdmin command notice when a logical HA URI is being used, and make the appropriate
RPC call to _all_ of the NNs, instead of just one? There's some related discussion about this
on HDFS-3744, where we discuss the fact that one must call `hdfs dfsadmin -refreshNodes' on
both NNs in an HA setup.

What are peoples' thoughts on this issue?
                
> DFS#isInSafeMode needs to execute only on Active NameNode
> ---------------------------------------------------------
>
>                 Key: HDFS-3507
>                 URL: https://issues.apache.org/jira/browse/HDFS-3507
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: ha
>    Affects Versions: 2.1.0-alpha, 3.0.0
>            Reporter: Vinay
>            Assignee: Vinay
>            Priority: Critical
>         Attachments: HDFS-3507.patch, HDFS-3507.patch
>
>
> Currently DFS#isInSafeMode is not Checking for the NN state. It can be executed on any
of the NNs.
> But HBase will use this API to check for the NN safemode before starting up its service.
> If first NN configured is in standby then DFS#isInSafeMode will check standby NNs safemode
but hbase want state of Active NN.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message