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)
Date Fri, 11 Sep 2015 01:26:23 GMT
Repository: tez
Updated Branches:
  refs/heads/master 8081008c3 -> 59f8d2ae8


TEZ-2808. Race condition between preemption and container assignment (bikas)


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

Branch: refs/heads/master
Commit: 59f8d2ae81110a6d11fbc9affc76bc57c6f86732
Parents: 8081008
Author: Bikas Saha <bikas@apache.org>
Authored: Thu Sep 10 18:26:09 2015 -0700
Committer: Bikas Saha <bikas@apache.org>
Committed: Thu Sep 10 18:26:09 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/59f8d2ae/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ab4af37..1c1ef94 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ Release 0.8.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2808. Race condition between preemption and container assignment
   TEZ-2807. Log data in the finish event instead of the start event
   TEZ-2799. SimpleHistoryParser NPE
   TEZ-2643. Minimize number of empty spills in Pipelined Sorter

http://git-wip-us.apache.org/repos/asf/tez/blob/59f8d2ae/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 2a5f937..a1c4753 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
@@ -1891,15 +1891,15 @@ public class YarnTaskSchedulerService extends TaskScheduler
         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