Search code examples
hadooprpc

How can I configure hadoop rpc's timeout?


My application program uses hadoop's rpc to remotely send/receive the requests in distributed environment.

org.apache.hadoop.ipc.RPC;
org.apache.hadoop.ipc.RPC.Server;

....

this.server = RPC.getServer(this, this.peerAddr.getHostName(), this.peerAddr.getPort(), this.conf);
this.server.start();

As the tasks get heavier, I observe frequent task failures due to IO Exception (that is possibly caused by thread interrupts).

I suspect the exception is being caused by a sort of RPC timeout.

How can I adjust the timeout for RPC in hadoop? For example, what I am expecting is something like ...

<property>
<name>hadoop.rpc.timeout</name>
<value>3000</value>
<description>The timeout for RPC call in ms</description>
</property>

Solution

  • hadoop 0.20 doesn't support this, please read this issue https://issues.apache.org/jira/browse/HADOOP-6889