You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Ahmad Shahzad <as...@gmail.com> on 2010/07/31 18:08:58 UTC

Socket Factories in hadoop

Hi ALL,
           Where can i find the socket factories that are used by hadoop to
create its sockets. By this i mean to say that map-reduce framework of
hadoop along with HDFS uses sockets to communicate with each other. So, i am
looking for socket factories that hadoop framework uses to carry out its
work. I looked into the hadoop directory and could find SocksSocketFactory
and StandardSocketFactory java classes in core/org/apache/hadoop/net
directory. Are these the only socket factories used by hadoop or is there
any more??

One more thing, can i create my own socket factory and use that to create
sockets that can be used by hadoop??

Ahmad

Re: Socket Factories in hadoop

Posted by Himanshu Vashishtha <va...@gmail.com>.
Hello,
You can define your own SocketFactory. Have a look at the method:
public static SocketFactory getSocketFactory(Configuration conf,
      Class<?> clazz){...} in the class org.apache.hadoop.net.NetUtils.java

Cheers,
Himanshu

On Sat, Jul 31, 2010 at 10:08 AM, Ahmad Shahzad <as...@gmail.com> wrote:

> Hi ALL,
>           Where can i find the socket factories that are used by hadoop to
> create its sockets. By this i mean to say that map-reduce framework of
> hadoop along with HDFS uses sockets to communicate with each other. So, i
> am
> looking for socket factories that hadoop framework uses to carry out its
> work. I looked into the hadoop directory and could find SocksSocketFactory
> and StandardSocketFactory java classes in core/org/apache/hadoop/net
> directory. Are these the only socket factories used by hadoop or is there
> any more??
>
> One more thing, can i create my own socket factory and use that to create
> sockets that can be used by hadoop??
>
> Ahmad
>