tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject git commit: TAJO-690: infinite loop occurs when rack task is assigning. (jinho)
Date Wed, 19 Mar 2014 01:17:26 GMT
Repository: incubator-tajo
Updated Branches:
  refs/heads/branch-0.8.0 434719a5c -> 9bcb65d27


TAJO-690: infinite loop occurs when rack task is assigning. (jinho)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tajo/commit/9bcb65d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/9bcb65d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/9bcb65d2

Branch: refs/heads/branch-0.8.0
Commit: 9bcb65d2747650e9ea1cd4de0c8d19e8eb7ed688
Parents: 434719a
Author: jinossy <jinossy@gmail.com>
Authored: Wed Mar 19 10:16:36 2014 +0900
Committer: jinossy <jinossy@gmail.com>
Committed: Wed Mar 19 10:16:36 2014 +0900

----------------------------------------------------------------------
 CHANGES.txt                                                     | 2 ++
 .../main/java/org/apache/tajo/master/DefaultTaskScheduler.java  | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/9bcb65d2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 119adda..235c778 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -276,6 +276,8 @@ Release 0.8.0 - unreleased
 
   BUG FIXES
 
+    TAJO-690: infinite loop occurs when rack task is assigning. (jinho)
+
     TAJO-689: NoSuchElementException occurs during assigning the leaf tasks. (jinho)
 
     TAJO-651: HcatalogStore should support (de)serialization of RCFile. (jinho)

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/9bcb65d2/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/DefaultTaskScheduler.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/DefaultTaskScheduler.java
b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/DefaultTaskScheduler.java
index 91f9cea..28015d5 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/DefaultTaskScheduler.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/DefaultTaskScheduler.java
@@ -639,7 +639,6 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler {
           //find remaining local task
           if (leafTasks.contains(attemptId)) {
             leafTasks.remove(attemptId);
-            leafTasksRackMapping.get(hostVolumeMapping.getRack()).remove(attemptId);
             //LOG.info(attemptId + " Assigned based on host match " + hostName);
             hostLocalAssigned++;
             totalAssigned++;
@@ -669,9 +668,11 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler {
         for (HostVolumeMapping tasks : remainingTasks) {
           while (tasks.getRemainingLocalTaskSize() > 0){
             QueryUnitAttemptId tId = tasks.getQueryUnitAttemptIdByRack(rack);
+
+            if (tId == null) break;
+
             if (leafTasks.contains(tId)) {
               leafTasks.remove(tId);
-              leafTasksRackMapping.get(rack).remove(tId);
               attemptId = tId;
               break;
             }


Mime
View raw message