hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-3148) The client should be able to use multiple local interfaces for data transfer
Date Sun, 01 Apr 2012 21:40:27 GMT

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

Eli Collins updated HDFS-3148:

    Attachment: hdfs-3148.txt

Updated patch:
- Makes getLocalInterfaceAddrs static
- Didn't move the DFSConfigsKey because the section of client keys farther up is for keys
which have defaults (this one does not, it's as high as client key) and the HA section
- Good catch wrt the debug log, fixed
- Fixed typo in hdfs-default.xml
- Fixed a bug in getLocalInterfaceAddrs where it wasn't filtering sub-interface IPs in the
IP range case and added a better method-level comment

Wrt multiple IPs we only add one address for each interface. The user can specify a list of
either IP address, IP range or interface name. If they specify a raw IP, we use it verbatim,
eg if they specify the IP of a host-level bond we just use the IP of the bond, and ignore
the fact that there may be sub-IPs because that's taken care of by the host. Ie we use just
one IP. If they specify an IP range we use all the interface IPs, and *not* sub-interface
IPs, that match the range. If they specify an interface name we use just the IP of that interface
and *not* its sub-interfaces. If we didn't use  java.net.preferIPv4Stack we could get multiple
addresses here (a v4 and v6 one) so v6 will have to be handled here as well whenever we add

In an earlier version I had precondition checks in NetUtils#addMatchingAddrs and DFSClient#getLocalInterfaceAddrs
to check the 1:1 but it got convoluted. Similarly, it's not an error if the configured # is
different than the actual # as we allow specifying a range which will match multiple interfaces.
Given that we log both the configured set and the actual set we can tell if the ones used
match our expectations.
> The client should be able to use multiple local interfaces for data transfer
> ----------------------------------------------------------------------------
>                 Key: HDFS-3148
>                 URL: https://issues.apache.org/jira/browse/HDFS-3148
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs client
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hdfs-3148-b1.txt, hdfs-3148.txt, hdfs-3148.txt
> HDFS-3147 covers using multiple interfaces on the server (Datanode) side. Clients should
also be able to utilize multiple *local* interfaces for outbound connections instead of always
using the interface for the local hostname. This can be accomplished with a new configuration
parameter ({{dfs.client.local.interfaces}}) that accepts a list of interfaces the client should
use. Acceptable configuration values are the same as the {{dfs.datanode.available.interfaces}}
parameter. The client binds its socket to a specific interface, which enables outbound traffic
to use that interface. Binding the client socket to a specific address is not sufficient to
ensure egress traffic uses that interface. Eg if multiple interfaces are on the same subnet
the host requires IP rules that use the source address (which bind sets) to select the destination
interface. The SO_BINDTODEVICE socket option could be used to select a specific interface
for the connection instead, however it requires JNI (is not in Java's SocketOptions) and root
access, which we don't want to require clients have.
> Like HDFS-3147, the client can use multiple local interfaces for data transfer. Since
the client already cache their connections to DNs choosing a local interface at random seems
like a good policy. Users can also pin a specific client to a specific interface by specifying
just that interface in dfs.client.local.interfaces.
> This change was discussed in HADOOP-6210 a while back, and is actually useful/independent
of the other HDFS-3140 changes.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message