Return-Path: X-Original-To: apmail-tez-commits-archive@minotaur.apache.org Delivered-To: apmail-tez-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFDC718890 for ; Thu, 6 Aug 2015 09:25:57 +0000 (UTC) Received: (qmail 54340 invoked by uid 500); 6 Aug 2015 09:25:54 -0000 Delivered-To: apmail-tez-commits-archive@tez.apache.org Received: (qmail 54257 invoked by uid 500); 6 Aug 2015 09:25:54 -0000 Mailing-List: contact commits-help@tez.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tez.apache.org Delivered-To: mailing list commits@tez.apache.org Received: (qmail 52961 invoked by uid 99); 6 Aug 2015 09:25:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Aug 2015 09:25:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F1259E6839; Thu, 6 Aug 2015 09:25:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sseth@apache.org To: commits@tez.apache.org Date: Thu, 06 Aug 2015 09:26:19 -0000 Message-Id: <6a7f3492c951487ebd4dcbbe6ab180d1@git.apache.org> In-Reply-To: <10a0859464864279b3a9f48415e4a976@git.apache.org> References: <10a0859464864279b3a9f48415e4a976@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [27/51] [abbrv] tez git commit: TEZ-2465. Retrun the status of a kill request in TaskRunner2. (sseth) 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/db3f6aa7 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/db3f6aa7 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/db3f6aa7 Branch: refs/heads/TEZ-2003 Commit: db3f6aa793bc1e92ec0115cda90395bf1f7497de Parents: 625220e Author: Siddharth Seth Authored: Tue May 19 13:57:58 2015 -0700 Committer: Siddharth Seth Committed: Thu Aug 6 01:26:09 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/db3f6aa7/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/db3f6aa7/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; }