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

Vinay commented on HDFS-3507:
-----------------------------

Ah! I just realize that, intention of this Jira is to get safemode status( i.e 
SafeModeAction.GET ) from only Active NN. 
I agree that SAFEMODE_GET is not a write operation, but If we consider 
SAFEMODE_GET as READ, and "dfs.ha.allow.stale.reads" is set, then SAFEMODE_GET 
will be again executed on the STANBY NN.

 {code}+    if (isChecked) {
+      if (action == SafeModeAction.SAFEMODE_GET) {
+        opCategory = OperationCategory.READ;
+      } else {
+        opCategory = OperationCategory.WRITE
+      }{code}

So I feel, SAFEMODE_GET also should be categorized as WRITE ( only to avoid 
execution on STANBY NN), else need to check state explicitly.
                
> 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.0.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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to