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

Erik Krogen commented on HDFS-13566:
------------------------------------

Cool, looking good. I agree that just allowing additional ports is sufficient 
unless a use case arises that requires additional hostname bindings.

A few more things:
# {{MiniDFSCluster#getNameNodeAdditionalPort}} should be adapted in the same 
way that {{NameNode}} was to avoid the unnecessary cast.
# {{NameNode}} L1080 you make a second call to 
{{getAdditionalNameNodeAddresses}}, but you already have the set, it should 
just be reused
# {{Server}} L380, you don't need to check if {{call}} is null, {{instanceof}} 
will return false in this case (thanks to my IDE for teaching me this!)
# re: your comment about setting "fs.defaultFS" in TestDistributedFileSystem, 
that makes sense, but I think you are solving the problem in the wrong way. It 
is valuable to use an ephemeral port to avoid port conflicts during unit tests, 
which have plagued HDFS in the past. I think it would be better to set the port 
for both the default and the additional listeners to be 0 (ephemeral), then 
extract the ports from the MiniDFSCluster to use them. This will require 
updating the last line of {{Server#addAdditionalListener}} to:
{code}
additionalListenerMap.put(newListener.getAddress().getPort(), newListener);
{code}
The same could be done in {{TestIPC#testMultiplePorts}}.
# You have a few lines that are too long. I'm sure checkstyle will warn you 
about them.

> Add configurable additional RPC listener to NameNode
> ----------------------------------------------------
>
>                 Key: HDFS-13566
>                 URL: https://issues.apache.org/jira/browse/HDFS-13566
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ipc
>            Reporter: Chen Liang
>            Assignee: Chen Liang
>            Priority: Major
>         Attachments: HDFS-13566.001.patch, HDFS-13566.002.patch
>
>
> This Jira aims to add the capability to NameNode to run additional 
> listener(s). Such that NameNode can be accessed from multiple ports. 
> Fundamentally, this Jira tries to extend ipc.Server to allow configured with 
> more listeners, binding to different ports, but sharing the same call queue 
> and the handlers. Useful when different clients are only allowed to access 
> certain different ports. Combined with HDFS-13547, this also allows different 
> ports to have different SASL security levels. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to