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

Xiao Chen commented on HDFS-9458:
---------------------------------

Thanks [~cnauroth] for the comments! Attached patch 2.
bq. I think we still need to keep the line that sets 
{{DFS_NAMENODE_HTTP_ADDRESS_KEY}}. This test starts both a regular NameNode and 
a BackupNode. We'll want to avoid binding to default ports for both of those.
I think you meant to say we need {{DFS_NAMENODE_BACKUP_HTTP_ADDRESS_KEY}}? This 
was unnecessarily set twice. I kept the line that sets it at line 161 (line # 
in trunk), the patch removed the first one.

bq. It's also problematic that the NameNode RPC port is hard-coded to 1234 
(FS_DEFAULT_NAME_KEY). I recommend that we change that to 0 too.
We can't set it to 0 here because in {{BackupNode#initialize}} where 
{{handshake}} is invoked, rpc address is read from configuration. Thus we need 
to set it to a port numer. I have just learnt that we have a util to get a 
usable ephemeral port, so updated patch 2 to use {{ServerSocketUtil#getport}}.

> TestBackupNode always binds to port 50070, which can cause bind failures.
> -------------------------------------------------------------------------
>
>                 Key: HDFS-9458
>                 URL: https://issues.apache.org/jira/browse/HDFS-9458
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>            Reporter: Chris Nauroth
>            Assignee: Xiao Chen
>         Attachments: HDFS-9458.001.patch, HDFS-9458.002.patch
>
>
> {{TestBackupNode}} does not override port settings to use a dynamically 
> selected port for the NameNode HTTP server.  It uses the default of 50070 
> defined in hdfs-default.xml.  This should be changed to select a dynamic port 
> to avoid bind errors.



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

Reply via email to