[
https://issues.apache.org/jira/browse/HDFS-13523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16560332#comment-16560332
]
Erik Krogen commented on HDFS-13523:
------------------------------------
Thanks for working on this [~zhengxg3]! Glad we finally got the build fixed to
see a precommit run :)
I have one overall concern. We're creating the observer by setting its
{{StartupOperation}} flag, overriding whatever was originally specified. This
could lead to confusing behavior if you specify a startup flag and a topology
with an observer. Maybe we can throw an exception in this case to avoid
unexpected behavior? Or, is it possible to have both startup options? I believe
they are just arguments passed to the NameNode - do we have to restrict
ourselves to only one?
Detailed comments on the current patch:
* MiniDFSCluster L1077 has a typo, {{opeationCopy}}. Also, I think this could
be better simplified to either:
{code}
createNameNode(hdfsConf, false, nn.isObserver() ? StartupOperation.OBSERVER :
operation,
{code}
Or, if you're not a fan of ternary statements:
{code}
StartupOption namenodeOperation;
if (nn.isObserver()) {
namenodeOperation = StartupOption.OBSERVER;
} else {
namenodeOperation = operation;
}
createNameNode(hdfsConf, false, namenodeOperation,
{code}
* I think the {{simpleHATopologyWithObserver}} should have 3 NameNodes: 1
active, 1 standby, 1 observer. It is not really HA if it is just an active and
observer.
* I feel that the test could be more appropriately called something like
{{testSetUpClusterWithObserver}}
* The test is currently asserting that there is at least one observer; probably
asserting that there is exactly one observer would be better. Also, it could be
simplified by using an enhanced for-loop to iterate over the array.
> Support observer nodes in MiniDFSCluster
> ----------------------------------------
>
> Key: HDFS-13523
> URL: https://issues.apache.org/jira/browse/HDFS-13523
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode, test
> Reporter: Erik Krogen
> Assignee: Sherwood Zheng
> Priority: Major
> Attachments: HADOOP-13523-HADOOP-12943.000.patch,
> HADOOP-13523-HADOOP-12943.001.patch, HDFS-13523-HDFS-12943.001.patch,
> HDFS-13523-HDFS-12943.002.patch, HDFS-13523-HDFS-12943.003.patch,
> HDFS-13523-HDFS-12943.004.patch
>
>
> MiniDFSCluster should support Observer nodes so that we can write decent
> integration tests.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]