hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-4521) invalid network toploogies should not be cached
Date Fri, 22 Feb 2013 01:51:11 GMT

     [ https://issues.apache.org/jira/browse/HDFS-4521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Colin Patrick McCabe updated HDFS-4521:

    Attachment: HDFS-4521.001.patch

This patch refactors the {{DNSToSwitchMapping}} interface somewhat.  Utility methods are now
in {{DNSToSwitchManager}}, rather than in {{AbstractDNSToSwitchMapping}}.  It makes more sense
to use composition here.

This also eliminates the "double caching" that was formerly going on, where we had a map in
{{CachedDNSToSwitchMapping}} storing the exact same data as was present in {{TableMapping}}.

I used the visitor pattern to avoid exposing the data structure that the mappings were stored

I add the clearCachedMappings function and implement it for all {{DNSToSwitchMapping}} subclasses.
 In the DatanodeManager, invoke this function when there is an {{InvalidTopologyException}}.
> invalid network toploogies should not be cached
> -----------------------------------------------
>                 Key: HDFS-4521
>                 URL: https://issues.apache.org/jira/browse/HDFS-4521
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 2.0.4-beta
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>            Priority: Minor
>         Attachments: HDFS-4521.001.patch
> When the network topology is invalid, the DataNode refuses to start with a message such
as this:
> {quote}
> org.apache.hadoop.hdfs.server.protocol.DatanodeProtocol.registerDatanode from
> org.apache.hadoop.net.NetworkTopology$InvalidTopologyException: Invalid network topology.
You cannot have a rack and a non-rack node at the same level of the network topology.
> {quote}
> This is expected if you specify a topology file or script which puts leaf nodes at two
different depths.  However, one problem we have now is that this incorrect topology is cached
forever.  Once the NameNode sees it, this DataNode can never be added to the cluster, since
this exception will be rethrown each time.  The NameNode will not check to see if the topology
file or script has changed.  We should clear the topology mappings when there is an InvalidTopologyException,
to prevent this problem.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message