From 5c509f5f0c9a39de96812e2a865ce5544f10aa29 Mon Sep 17 00:00:00 2001 From: Xuan Date: Fri, 24 Feb 2017 11:42:23 -0800 Subject: [PATCH] HADOOP-14116:FailoverOnNetworkExceptionRetry does not wait when failover on certain exception. Contributed by Jian He (cherry picked from commit 289bc50e663b882956878eeaefe0eaa1ef4ed39e) --- .../main/java/org/apache/hadoop/io/retry/RetryPolicies.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java index 0c523a5d23e..d6f3e04f0e5 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java @@ -683,7 +683,8 @@ public class RetryPolicies { } else if (e instanceof SocketException || (e instanceof IOException && !(e instanceof RemoteException))) { if (isIdempotentOrAtMostOnce) { - return RetryAction.FAILOVER_AND_RETRY; + return new RetryAction(RetryAction.RetryDecision.FAILOVER_AND_RETRY, + getFailoverOrRetrySleepTime(retries)); } else { return new RetryAction(RetryAction.RetryDecision.FAIL, 0, "the invoked method is not idempotent, and unable to determine "