hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From naganarasimha...@apache.org
Subject hadoop git commit: HADOOP-14966. Handle JDK-8071638 for hadoop-common. Contributed by Bibin A Chundatt.
Date Mon, 23 Oct 2017 18:12:49 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 4b00c9a47 -> 6b8122458


HADOOP-14966. Handle JDK-8071638 for hadoop-common. Contributed by Bibin A Chundatt.


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

Branch: refs/heads/trunk
Commit: 6b8122458ede9ececb138bed99d368580e5439a1
Parents: 4b00c9a
Author: Naganarasimha <naganarasimha_gr@apache.org>
Authored: Mon Oct 23 23:41:38 2017 +0530
Committer: Naganarasimha <naganarasimha_gr@apache.org>
Committed: Mon Oct 23 23:42:06 2017 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/util/concurrent/ExecutorHelper.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6b812245/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/concurrent/ExecutorHelper.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/concurrent/ExecutorHelper.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/concurrent/ExecutorHelper.java
index 02452a3..0b34951 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/concurrent/ExecutorHelper.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/concurrent/ExecutorHelper.java
@@ -40,14 +40,16 @@ public final class ExecutorHelper {
 
     //For additional information, see: https://docs.oracle
     // .com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor
-    // .html#afterExecute(java.lang.Runnable,%20java.lang.Throwable) .
+    // .html#afterExecute(java.lang.Runnable,%20java.lang.Throwable)
 
-    if (t == null && r instanceof Future<?>) {
+    // Handle JDK-8071638
+    if (t == null && r instanceof Future<?> && ((Future<?>) r).isDone())
{
       try {
         ((Future<?>) r).get();
       } catch (ExecutionException ee) {
-        LOG.warn("Execution exception when running task in " +
-            Thread.currentThread().getName());
+        LOG.warn(
+            "Execution exception when running task in " + Thread.currentThread()
+                .getName());
         t = ee.getCause();
       } catch (InterruptedException ie) {
         LOG.warn("Thread (" + Thread.currentThread() + ") interrupted: ", ie);


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


Mime
View raw message