You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by pr...@apache.org on 2020/04/21 06:32:11 UTC

[hadoop] branch trunk updated: YARN-10240. Prevent Fatal CancelledException in TimelineV2Client when stopping

This is an automated email from the ASF dual-hosted git repository.

prabhujoseph pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 60fa153  YARN-10240. Prevent Fatal CancelledException in TimelineV2Client when stopping
60fa153 is described below

commit 60fa15366e8f2d59f4dc8e7beaa6edcbbcb9c18f
Author: Prabhu Joseph <pj...@cloudera.com>
AuthorDate: Tue Apr 21 12:01:29 2020 +0530

    YARN-10240. Prevent Fatal CancelledException in TimelineV2Client when stopping
    
    Contributed by Tarun Parimi.
---
 .../org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java
index 6536956..caef955 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java
@@ -32,6 +32,7 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.CancellationException;
 
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
@@ -575,9 +576,11 @@ public class TimelineV2ClientImpl extends TimelineV2Client {
         } catch (ExecutionException e) {
           throw new YarnException("Failed while publishing entity",
               e.getCause());
-        } catch (InterruptedException e) {
+        } catch (InterruptedException | CancellationException e) {
           Thread.currentThread().interrupt();
           throw new YarnException("Interrupted while publishing entity", e);
+        } catch (Exception e) {
+          throw new YarnException("Encountered error while publishing entity", e);
         }
       }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org