Repository: tajo Updated Branches: refs/heads/branch-0.11.0 cef44bcdd -> 0f1508dec
TAJO-1851: Can not release a different rack task. Project: http://git-wip-us.apache.org/repos/asf/tajo/repo Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/0f1508de Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/0f1508de Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/0f1508de Branch: refs/heads/branch-0.11.0 Commit: 0f1508deceefd5527f4ae4e3cec37f91294978e8 Parents: cef44bc Author: Jinho Kim <[email protected]> Authored: Wed Sep 16 12:40:54 2015 +0900 Committer: Jinho Kim <[email protected]> Committed: Wed Sep 16 12:40:54 2015 +0900 ---------------------------------------------------------------------- CHANGES | 2 ++ .../org/apache/tajo/querymaster/DefaultTaskScheduler.java | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tajo/blob/0f1508de/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 3ec021a..3f90e5f 100644 --- a/CHANGES +++ b/CHANGES @@ -266,6 +266,8 @@ Release 0.11.0 - unreleased BUG FIXES + TAJO-1851: Can not release a different rack task. (jinho) + TAJO-1830: Fix race condition in HdfsServiceTracker. (jinho) TAJO-1727: Avoid to create external table using TableSpace. (jaehwa) http://git-wip-us.apache.org/repos/asf/tajo/blob/0f1508de/tajo-core/src/main/java/org/apache/tajo/querymaster/DefaultTaskScheduler.java ---------------------------------------------------------------------- diff --git a/tajo-core/src/main/java/org/apache/tajo/querymaster/DefaultTaskScheduler.java b/tajo-core/src/main/java/org/apache/tajo/querymaster/DefaultTaskScheduler.java index d380295..b65b5a9 100644 --- a/tajo-core/src/main/java/org/apache/tajo/querymaster/DefaultTaskScheduler.java +++ b/tajo-core/src/main/java/org/apache/tajo/querymaster/DefaultTaskScheduler.java @@ -818,7 +818,7 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler { int nodes = context.getMasterContext().getWorkerMap().size(); //this part is to control the assignment of tail and remote task balancing per node int tailLimit = 1; - if (remainingScheduledObjectNum() > 0) { + if (remainingScheduledObjectNum() > 0 && nodes > 0) { tailLimit = Math.max(remainingScheduledObjectNum() / nodes, 1); } @@ -835,9 +835,6 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler { // rack-local allocation ////////////////////////////////////////////////////////////////////// attemptId = allocateRackTask(host); - if (attemptId != null && hostVolumeMapping != null) { - hostVolumeMapping.lastAssignedVolumeId.put(attemptId, HostVolumeMapping.REMOTE); - } ////////////////////////////////////////////////////////////////////// // random node allocation @@ -848,6 +845,10 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler { leafTasks.remove(attemptId); } } + + if (attemptId != null && hostVolumeMapping != null) { + hostVolumeMapping.lastAssignedVolumeId.put(attemptId, HostVolumeMapping.REMOTE); + } rackAssign++; } else { localAssign++;
