tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bi...@apache.org
Subject tez git commit: TEZ-2808. Race condition between preemption and container assignment (bikas) (cherry picked from commit 59f8d2ae81110a6d11fbc9affc76bc57c6f86732)
Date Thu, 24 Sep 2015 23:18:57 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.7 2bc964391 -> 91fd5a607


TEZ-2808. Race condition between preemption and container assignment (bikas)
(cherry picked from commit 59f8d2ae81110a6d11fbc9affc76bc57c6f86732)

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/branch-0.7
Commit: 91fd5a607e9d8e41bce9365e4ad29fb8828f0c6c
Parents: 2bc9643
Author: Bikas Saha <bikas@apache.org>
Authored: Thu Sep 10 18:26:09 2015 -0700
Committer: Bikas Saha <bikas@apache.org>
Committed: Thu Sep 24 16:18:26 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                           |  1 +
 .../tez/dag/app/rm/YarnTaskSchedulerService.java      | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/91fd5a60/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 51c3206..74a83f1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.7.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES
+  TEZ-2808. Race condition between preemption and container assignment
   TEZ-2853. Tez UI: task attempt page is coming empty
   TEZ-2716. DefaultSorter.isRleNeeded not thread safe
   TEZ-2847. Tez UI: Task details doesn't gets updated on manual refresh after job complete

http://git-wip-us.apache.org/repos/asf/tez/blob/91fd5a60/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
index 54c297b..f7b7ea3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
@@ -2016,15 +2016,15 @@ public class YarnTaskSchedulerService extends TaskSchedulerService
         long currentTs = System.currentTimeMillis();
         long nextScheduleTs = delayedContainer.getNextScheduleTime();
         if (currentTs >= nextScheduleTs) {
-          // Remove the container and try scheduling it.
-          // TEZ-587 what if container is released by RM after this
-          // in onContainerCompleted()
-          delayedContainer = delayedContainers.poll();
-          if (delayedContainer == null) {
-            continue;
-          }
           Map<CookieContainerRequest, Container> assignedContainers = null;
           synchronized(YarnTaskSchedulerService.this) {
+            // Remove the container and try scheduling it.
+            // TEZ-587 what if container is released by RM after this
+            // in onContainerCompleted()
+            delayedContainer = delayedContainers.poll();
+            if (delayedContainer == null) {
+              continue;
+            }
             if (null !=
                 heldContainers.get(delayedContainer.getContainer().getId())) {
               assignedContainers = assignDelayedContainer(delayedContainer);


Mime
View raw message