You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Kevin <kl...@gmail.com> on 2008/09/06 02:14:57 UTC

How do specify certain IP to be used by datanode/namenode

Hi,

The machines I am using each has multiple network cards, and hence
multiple IP addresses. Some of them look like a default IP. However, I
wish to use some other IPs, and tried to modify the hadoop-site.xml,
masters, and slaves files. But it looks that the IP still jumps to the
default ones when hadoop runs. Does anyone have an idea how I could
possibly make it work? Thank you!

-Kevin

Re: How do specify certain IP to be used by datanode/namenode

Posted by Dennis Kubes <ku...@apache.org>.
In your hadoop-site.xml file in config set the following variable:

  <property>
   <name>dfs.datanode.dns.interface</name>
   <value>default</value>
   <description>The name of the Network Interface from which a data node 
should
   report its IP address.
   </description>
  </property>

Change default to the name of your interface (network card), usually 
eth0, eth1, etc.

Dennis

Kevin wrote:
> Hi,
> 
> The machines I am using each has multiple network cards, and hence
> multiple IP addresses. Some of them look like a default IP. However, I
> wish to use some other IPs, and tried to modify the hadoop-site.xml,
> masters, and slaves files. But it looks that the IP still jumps to the
> default ones when hadoop runs. Does anyone have an idea how I could
> possibly make it work? Thank you!
> 
> -Kevin

Re: How do specify certain IP to be used by datanode/namenode

Posted by Jean-Daniel Cryans <jd...@apache.org>.
Kevin,

I think specifying datanode.dns.interface alone for dfs and mapred is enough
(not sure). You only have to set it to eth0 or eth1, etc

J-D

On Sat, Sep 6, 2008 at 7:18 PM, Kevin <kl...@gmail.com> wrote:

> Hi J-D,
>
> I could not try it right now as I am not familiar with setting up DNS
> server (I assume the parameters you mentioned are those specifying DNS
> server). It actually becomes more interesting as why specifying the IP
> does not suffice? Do you mean that hadoop will decide the right IP of
> a node by its own, instead of sticking to the default one?
>
> -Kevin
>
>
>
> On Fri, Sep 5, 2008 at 8:45 PM, Jean-Daniel Cryans <jd...@apache.org>
> wrote:
> > Kevin,
> >
> > Did you try changing the
> >
> dfs.datanode.dns.interface/dfs.datanode.dns.nameserver/mapred.tasktracker.dns.interface/mapred.tasktracker.dns.nameserver
> > parameters?
> >
> > J-D
> >
> > On Fri, Sep 5, 2008 at 8:14 PM, Kevin <kl...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> The machines I am using each has multiple network cards, and hence
> >> multiple IP addresses. Some of them look like a default IP. However, I
> >> wish to use some other IPs, and tried to modify the hadoop-site.xml,
> >> masters, and slaves files. But it looks that the IP still jumps to the
> >> default ones when hadoop runs. Does anyone have an idea how I could
> >> possibly make it work? Thank you!
> >>
> >> -Kevin
> >>
> >
>

Re: How do specify certain IP to be used by datanode/namenode

Posted by Kevin <kl...@gmail.com>.
Hi J-D,

I could not try it right now as I am not familiar with setting up DNS
server (I assume the parameters you mentioned are those specifying DNS
server). It actually becomes more interesting as why specifying the IP
does not suffice? Do you mean that hadoop will decide the right IP of
a node by its own, instead of sticking to the default one?

-Kevin



On Fri, Sep 5, 2008 at 8:45 PM, Jean-Daniel Cryans <jd...@apache.org> wrote:
> Kevin,
>
> Did you try changing the
> dfs.datanode.dns.interface/dfs.datanode.dns.nameserver/mapred.tasktracker.dns.interface/mapred.tasktracker.dns.nameserver
> parameters?
>
> J-D
>
> On Fri, Sep 5, 2008 at 8:14 PM, Kevin <kl...@gmail.com> wrote:
>
>> Hi,
>>
>> The machines I am using each has multiple network cards, and hence
>> multiple IP addresses. Some of them look like a default IP. However, I
>> wish to use some other IPs, and tried to modify the hadoop-site.xml,
>> masters, and slaves files. But it looks that the IP still jumps to the
>> default ones when hadoop runs. Does anyone have an idea how I could
>> possibly make it work? Thank you!
>>
>> -Kevin
>>
>

Re: How do specify certain IP to be used by datanode/namenode

Posted by Jean-Daniel Cryans <jd...@apache.org>.
Kevin,

Did you try changing the
dfs.datanode.dns.interface/dfs.datanode.dns.nameserver/mapred.tasktracker.dns.interface/mapred.tasktracker.dns.nameserver
parameters?

J-D

On Fri, Sep 5, 2008 at 8:14 PM, Kevin <kl...@gmail.com> wrote:

> Hi,
>
> The machines I am using each has multiple network cards, and hence
> multiple IP addresses. Some of them look like a default IP. However, I
> wish to use some other IPs, and tried to modify the hadoop-site.xml,
> masters, and slaves files. But it looks that the IP still jumps to the
> default ones when hadoop runs. Does anyone have an idea how I could
> possibly make it work? Thank you!
>
> -Kevin
>