hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject hadoop git commit: YARN-3155. Refactor the exception handling code for TimelineClientImpl's retryOn method (Li Lu via wangda)
Date Tue, 10 Feb 2015 01:31:27 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 c0e14d546 -> 4d4442cb3


YARN-3155. Refactor the exception handling code for TimelineClientImpl's retryOn method (Li
Lu via wangda)

(cherry picked from commit 00a748d24a565bce0cc8cfa2bdcf165778cea395)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4d4442cb
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4d4442cb
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4d4442cb

Branch: refs/heads/branch-2
Commit: 4d4442cb39a4bb76841e222249492a706bf3e44c
Parents: c0e14d5
Author: Wangda Tan <wangda@apache.org>
Authored: Mon Feb 9 17:20:25 2015 -0800
Committer: Wangda Tan <wangda@apache.org>
Committed: Mon Feb 9 17:30:59 2015 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                      |  3 +++
 .../yarn/client/api/impl/TimelineClientImpl.java     | 15 +--------------
 2 files changed, 4 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4d4442cb/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 82fb766..7731840 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -221,6 +221,9 @@ Release 2.7.0 - UNRELEASED
     YARN-3144. Configuration for making delegation token failures to timeline
     server not-fatal (Jonathan Eagles via jlowe)
 
+    YARN-3155. Refactor the exception handling code for TimelineClientImpl's 
+    retryOn method (Li Lu via wangda)
+
   OPTIMIZATIONS
 
     YARN-2990. FairScheduler's delay-scheduling always waits for node-local and 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4d4442cb/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java
index 0b88632..af68492 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineClientImpl.java
@@ -178,20 +178,7 @@ public class TimelineClientImpl extends TimelineClient {
         try {
           // try perform the op, if fail, keep retrying
           return op.run();
-        }  catch (IOException e) {
-          // We may only throw runtime and IO exceptions. After switching to
-          // Java 1.7, we can merge these two catch blocks into one.
-
-          // break if there's no retries left
-          if (leftRetries == 0) {
-            break;
-          }
-          if (op.shouldRetryOn(e)) {
-            logException(e, leftRetries);
-          } else {
-            throw e;
-          }
-        } catch (RuntimeException e) {
+        } catch (IOException | RuntimeException e) {
           // break if there's no retries left
           if (leftRetries == 0) {
             break;


Mime
View raw message