tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject [20/50] [abbrv] tez git commit: TEZ-2465. Retrun the status of a kill request in TaskRunner2. (sseth)
Date Fri, 21 Aug 2015 01:36:28 GMT
TEZ-2465. Retrun the status of a kill request in TaskRunner2. (sseth)


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

Branch: refs/heads/TEZ-2003
Commit: bec374216f56f0dae31be10dab4d7eeacff243a3
Parents: 848b137
Author: Siddharth Seth <sseth@apache.org>
Authored: Tue May 19 13:57:58 2015 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Thu Aug 20 18:22:07 2015 -0700

----------------------------------------------------------------------
 TEZ-2003-CHANGES.txt                                         | 1 +
 .../java/org/apache/tez/runtime/task/TezTaskRunner2.java     | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/bec37421/TEZ-2003-CHANGES.txt
----------------------------------------------------------------------
diff --git a/TEZ-2003-CHANGES.txt b/TEZ-2003-CHANGES.txt
index ed72d6b..ca3383c 100644
--- a/TEZ-2003-CHANGES.txt
+++ b/TEZ-2003-CHANGES.txt
@@ -26,5 +26,6 @@ ALL CHANGES:
   TEZ-2438. tez-tools version in the branch is incorrect.
   TEZ-2434. Allow tasks to be killed in the Runtime.
   TEZ-2443. TaskRunner2 should call abort, NPEs while cleaning up tasks.
+  TEZ-2465. Retrun the status of a kill request in TaskRunner2.
 
 INCOMPATIBLE CHANGES:

http://git-wip-us.apache.org/repos/asf/tez/blob/bec37421/tez-runtime-internals/src/main/java/org/apache/tez/runtime/task/TezTaskRunner2.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/task/TezTaskRunner2.java
b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/task/TezTaskRunner2.java
index ffbc6e8..3bf9f84 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/task/TezTaskRunner2.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/task/TezTaskRunner2.java
@@ -247,7 +247,11 @@ public class TezTaskRunner2 {
     }
   }
 
-  public void killTask() {
+  /**
+   * Attempt to kill the running task, if it hasn't already completed for some other reason.
+   * @return true if the task kill was honored, false otherwise
+   */
+  public boolean killTask() {
     synchronized (this) {
       if (isRunningState()) {
         if (trySettingEndReason(EndReason.KILL_REQUESTED)) {
@@ -256,9 +260,11 @@ public class TezTaskRunner2 {
             taskKillStartTime = System.currentTimeMillis();
             taskRunnerCallable.interruptTask();
           }
+          return true;
         }
       }
     }
+    return false;
   }
 
 


Mime
View raw message