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:20:52 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.6 edc272098 -> ad9206b00


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

Conflicts:
	CHANGES.txt
(cherry picked from commit 91fd5a607e9d8e41bce9365e4ad29fb8828f0c6c)

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/ad9206b0
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/ad9206b0
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/ad9206b0

Branch: refs/heads/branch-0.6
Commit: ad9206b0065e07f45e1fbca3fe3bff125cb0b914
Parents: edc2720
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:20:40 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/ad9206b0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 287b3df..d5cd2dc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.3: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2808. Race condition between preemption and container assignment
   TEZ-2203. Intern strings in tez counters
   TEZ-2834. Make Tez preemption resilient to incorrect free resource reported
   by YARN

http://git-wip-us.apache.org/repos/asf/tez/blob/ad9206b0/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 10debc3..d2ecc67 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
@@ -1990,15 +1990,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