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:23:20 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.5 3b8a480c1 -> de87d72c2


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
(cherry picked from commit ad9206b0065e07f45e1fbca3fe3bff125cb0b914)

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

Branch: refs/heads/branch-0.5
Commit: de87d72c2f81d244f38b3312222389fe6e142858
Parents: 3b8a480
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:23:01 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/de87d72c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 986ab9b..e5d19b2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
   TEZ-2552. CRC errors can cause job to run for very long time in large jobs.
 
 ALL CHANGES:
+  TEZ-2808. Race condition between preemption and container assignment
   TEZ-1929. pre-empted tasks should be marked as killed instead of failed
   TEZ-1773. Add attempt failure cause enum to the attempt failed/killed
   history record

http://git-wip-us.apache.org/repos/asf/tez/blob/de87d72c/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 6a024c3..1ecf6a8 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
@@ -1983,15 +1983,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