[
https://issues.apache.org/jira/browse/HDFS-11094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15675208#comment-15675208
]
Mingliang Liu commented on HDFS-11094:
--------------------------------------
+1
Some comments:
# Is it possible to add a unit test for the HAState is sent during a
versionRequest RPC?
# Add some logging will be very helpful, e.g. {{LOG.info("Acknowledging ACTIVE
Namenode during handshake" + actor);}}
{code}
313 if(nsInfo.getState() == HAServiceState.ACTIVE && bpServiceToActive
== null) {
314 bpServiceToActive = actor;
315 }
{code}
# The checkstyle warnings are related. Let's address them.
[~daryn] and [~arpitagarwal] If you don't have any comments, I'll commit this
after the above are addressed.
> Send back HAState along with NamespaceInfo during a versionRequest as an
> optional parameter
> -------------------------------------------------------------------------------------------
>
> Key: HDFS-11094
> URL: https://issues.apache.org/jira/browse/HDFS-11094
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Eric Badger
> Assignee: Eric Badger
> Attachments: HDFS-11094.001.patch, HDFS-11094.002.patch,
> HDFS-11094.003.patch, HDFS-11094.004.patch, HDFS-11094.005.patch,
> HDFS-11094.006.patch
>
>
> The datanode should know which NN is active when it is connecting/registering
> to the NN. Currently, it only figures this out during its first (and
> subsequent) heartbeat(s) and so there is a period of time where the datanode
> is alive and registered, but can't actually do anything because it doesn't
> know which NN is active. A byproduct of this is that the MiniDFSCluster will
> become active before it knows what NN is active, which can lead to NPEs when
> calling getActiveNN().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]