You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Tom White (JIRA)" <ji...@apache.org> on 2011/03/02 21:22:36 UTC

[jira] Updated: (HADOOP-7030) new topology mapping implementations

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

Tom White updated HADOOP-7030:
------------------------------

    Assignee: Patrick Angeles
      Status: Open  (was: Patch Available)

This looks like a useful addition. Here are my comments on the patch:

* Could you combine the two types of file, so that if there are three columns the first two are interpreted as a range, otherwise use the first as a single host. Or just support CIDR notation?
* Have you thought about InetAddress to avoid implementing IP address parsing logic? http://guava-libraries.googlecode.com/svn/tags/release08/javadoc/com/google/common/net/InetAddresses.html might be useful (there was talk of introducing Guava recently).
* RefreshableDNSToSwitchMapping isn't hooked up yet, so perhaps it should go in a follow on JIRA.
* The name "TableMapping" is a bit general. How about "FileBasedMapping", or similar?
* The configuration keys should go in CommonConfigurationKeysPublic.
* Primes are not needed in hashCode implementations. For Ip4 Arrays.hashCode(value) is sufficient.
* The tests swallow exceptions - there should at least be a comment saying that this is expected. Also, fail() with a message is preferable to assertTrue(false).
* The tests should be JUnit 4 style.

> new topology mapping implementations
> ------------------------------------
>
>                 Key: HADOOP-7030
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7030
>             Project: Hadoop Common
>          Issue Type: New Feature
>    Affects Versions: 0.21.0, 0.20.2, 0.20.1
>            Reporter: Patrick Angeles
>            Assignee: Patrick Angeles
>         Attachments: HADOOP-7030-2.patch, HADOOP-7030.patch, topology.patch
>
>
> The default ScriptBasedMapping implementation of DNSToSwitchMapping for determining cluster topology has some drawbacks. Principally, it forks to an OS-specific script.
> This issue proposes two new Java implementations of DNSToSwitchMapping. TableMapping reads a two column text file that maps an IP or hostname to a rack ID. Ip4RangeMapping reads a three column text file where each line represents a start and end IP range plus a rack ID.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira