HADOOP-6667. RPC.waitForProxy should retry through NoRouteToHostException. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@938322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas White 2010-04-27 04:38:23 +00:00
parent 75e0b765ea
commit 2bec54de58
2 changed files with 7 additions and 0 deletions

View File

@ -226,6 +226,9 @@ Trunk (unreleased changes)
HADOOP-6717. Log levels in o.a.h.security.Groups too high
(Todd Lipcon via jghoman)
HADOOP-6667. RPC.waitForProxy should retry through NoRouteToHostException.
(Todd Lipcon via tomwhite)
OPTIMIZATIONS
HADOOP-6467. Improve the performance on HarFileSystem.listStatus(..).

View File

@ -23,6 +23,7 @@ import java.lang.reflect.Method;
import java.net.ConnectException;
import java.net.InetSocketAddress;
import java.net.NoRouteToHostException;
import java.net.SocketTimeoutException;
import java.io.*;
import java.util.Map;
@ -186,6 +187,9 @@ public class RPC {
} catch(SocketTimeoutException te) { // namenode is busy
LOG.info("Problem connecting to server: " + addr);
ioe = te;
} catch(NoRouteToHostException nrthe) { // perhaps a VIP is failing over
LOG.info("No route to host for server: " + addr);
ioe = nrthe;
}
// check if timed out
if (System.currentTimeMillis()-timeout >= startTime) {