hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Executing hadoop binded on localhost
Date Mon, 11 Sep 2006 10:21:32 GMT
Doug Cutting wrote:
> Sylvain Wallez wrote:
>> Philippe's question is related to machines with multiples interfaces
>> (e.g. one public-facing interface and another one for a private
>> network). We'd like to bind Hadoop's sockets to the private interface,
>> so that only machines on the private network can access it.
>
> Does the following address your needs?
>
> http://svn.apache.org/viewvc?view=rev&revision=441204
>
> http://issues.apache.org/jira/browse/HADOOP-497

Don't think so (although I have to understand the exact implication of
this).

That should be in o.a.h.ipc.Server$Listener that says:

      address = new InetSocketAddress(port);
      // Create a new server socket and set to non blocking mode
      acceptChannel = ServerSocketChannel.open();
      acceptChannel.configureBlocking(false);

      // Bind the server socket to the local host and port
      acceptChannel.socket().bind(address, backlogLength);

The socket is bound to the wildcard address and therefore will accept
connections from any interface.

I don't know Hadoop's internals well, but it seems to me that an
additional configuration could do the trick, e.g.

    String itfAddr = conf.getString("ipc.server.listen.address")
    address = (itfAddr == null) ? new InetSocketAddress(port) : new
InetSocketAddress(itfAddr, port);

How does that sound?

Sylvain

-- 
Sylvain Wallez - http://bluxte.net


Mime
View raw message