You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Walter Su (JIRA)" <ji...@apache.org> on 2015/06/30 14:44:04 UTC
[jira] [Commented] (HDFS-8700) favoredNodes should accept ip addr
[ https://issues.apache.org/jira/browse/HDFS-8700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14608228#comment-14608228 ]
Walter Su commented on HDFS-8700:
---------------------------------
I found an issue before:
{code}
cluster = new MiniDFSCluster.Builder(conf).numDataNodes(capacities.length)
.hosts(new String[]{"localhost", "localhost"})
.racks(new String[]{"rack0", "rack1"}).simulatedCapacities(capacities).build();
{code}
It will cause 2 DNs both located in "rack1". Actually we should not create 2 DNs with the same hostname.
This jira blocks me fixing TestBalancer#testBalancerWithPinnedBlocks(). That's why I create this jira.
> favoredNodes should accept ip addr
> ----------------------------------
>
> Key: HDFS-8700
> URL: https://issues.apache.org/jira/browse/HDFS-8700
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Walter Su
> Assignee: Walter Su
> Priority: Minor
>
> NameNode accepts two forms of FavoredNodes, {{ip:port}} and {{host:port}}
> DFSClient#create(..) only uses {{host:port}}, if favoredNodes is created by
> {code}
> new InetSocketAddress(ip, port)
> {code}
> DFSClient will attempt a reverse lookup locally to get {{host:port}}, instead of sending {{ip:port}} directly to NameNode.
> It's not a problem in production. But it's a problem in MiniDFSCluster.
> MiniDFSCluster use fake hostname "host1.foo.com" to start DataNodes.
> DFSClient doesn't use StaticMapping. So if DFSClient do reverse lookup, "127.0.0.1:50470" becomes "localhost:50470".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)