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

Yi Liu commented on HDFS-3862:
------------------------------

Update patch to address all comments.

{quote}
Comment and log message confused me. Comment says we will do fence if user 
configured even though writer natively single writer.
But log message says, we ignore fencing as it is not mandatory from native 
writer. Am missing something here?
{quote}
Fencing is not mandatory, and we do fencing because it's configured. Ignore the 
failure and log warning message if fencing fails.  
I have updated the code comment and log message.

{quote}
Where are you asserting ZKFC failure here?
{quote}
asserting ZKFS failure is in ZKFCThread, I have added code comment there in the 
new patch.

{quote}
Finally my another concern is that, we need to keep shared storage configs at 
ZKFC now with this change o find out the sharedstorage is single writer or not, 
but zkfc will not be ralated directly to writer in fact, as that is purely NN 
storage layer. I can understand that the approach you have chosen here is much 
simpler than making calls to NN to know that writer fencing requirement.
{quote}
Yes, I get your meaning. From my point of view, there are two reasons:
* Currently, fencer configuration is also in hdfs-site.xml, and ZKFC read it 
directly. So for whether fencing is 
mandatory(JouralManager#isNativelySingleWriter), we use the same handling and 
ZKFC get from NN configuration directly. ZKFC doesn't have separate configure 
file and they run the same machine and use same configure file.
* If we use a RPC call to NN to get whether fencing is mandatory, for ZKFC, 
yes, it only calls once. But for HAAdmin, we also need to call when run 
failover. This is not necessary.

> QJM: don't require a fencer to be configured if shared storage has built-in 
> single-writer semantics
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-3862
>                 URL: https://issues.apache.org/jira/browse/HDFS-3862
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha
>    Affects Versions: QuorumJournalManager (HDFS-3077)
>            Reporter: Todd Lipcon
>            Assignee: Yi Liu
>         Attachments: HDFS-3862.001.patch, HDFS-3862.002.patch
>
>
> Currently, NN HA requires that the administrator configure a fencing method 
> to ensure that only a single NameNode may write to the shared storage at a 
> time. Some shared edits storage implementations (like QJM) inherently enforce 
> single-writer semantics at the storage level, and thus the user should not be 
> forced to specify one.
> We should extend the JournalManager interface so that the HA code can operate 
> without a configured fencer if the JM has such built-in fencing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to