You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by jh...@apache.org on 2016/05/10 02:26:23 UTC

tajo git commit: TAJO-2140: TajoInternalError does not contains reason stack trace.

Repository: tajo
Updated Branches:
  refs/heads/master fafb70633 -> 7f9c4c950


TAJO-2140: TajoInternalError does not contains reason stack trace.

Closes #1008


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

Branch: refs/heads/master
Commit: 7f9c4c950fe28de7df6662a947733c7b8abeecb7
Parents: fafb706
Author: Jinho Kim <jh...@apache.org>
Authored: Tue May 10 11:25:43 2016 +0900
Committer: Jinho Kim <jh...@apache.org>
Committed: Tue May 10 11:25:43 2016 +0900

----------------------------------------------------------------------
 CHANGES                                                      | 2 ++
 .../java/org/apache/tajo/exception/TajoInternalError.java    | 2 +-
 .../org/apache/tajo/querymaster/DefaultTaskScheduler.java    | 8 ++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/7f9c4c95/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 42d164f..ad9ca05 100644
--- a/CHANGES
+++ b/CHANGES
@@ -142,6 +142,8 @@ Release 0.12.0 - unreleased
 
   BUG FIXES
 
+    TAJO-2140: TajoInternalError does not contains reason stack trace. (jinho)
+
     TAJO-2135: Invalid join result when join key columns contain nulls. (jihoon)
 
     TAJO-2110: Fix incorrect DateTime and remove hard coded tests. (jinho)

http://git-wip-us.apache.org/repos/asf/tajo/blob/7f9c4c95/tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java
----------------------------------------------------------------------
diff --git a/tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java b/tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java
index 4decd21..859d5a3 100644
--- a/tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java
+++ b/tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java
@@ -35,7 +35,7 @@ public class TajoInternalError extends TajoError {
   }
 
   public TajoInternalError(Throwable t) {
-    super(ResultCode.INTERNAL_ERROR, t.getMessage());
+    super(ResultCode.INTERNAL_ERROR, t, t.getMessage());
   }
 
   public TajoInternalError(TajoException t) {

http://git-wip-us.apache.org/repos/asf/tajo/blob/7f9c4c95/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 cdf7c5e..401ba0a 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
@@ -775,7 +775,7 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler {
       return attemptId;
     }
 
-    public void assignToLeafTasks(LinkedList<TaskRequestEvent> taskRequests) {
+    public void assignToLeafTasks(LinkedList<TaskRequestEvent> taskRequests) throws InterruptedException {
       Collections.shuffle(taskRequests);
       LinkedList<TaskRequestEvent> remoteTaskRequests = new LinkedList<>();
       String queryMasterHostAndPort = context.getMasterContext().getQueryMasterContext().getWorkerContext().
@@ -934,6 +934,8 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler {
             warn(LOG, "Canceled requests: " + requestProto.getTaskRequestCount()
                 + " by " + ExceptionUtils.getFullStackTrace(e));
             continue;
+          } catch (InterruptedException e) {
+            throw e;
           } catch (Exception e) {
             throw new TajoInternalError(e);
           }
@@ -971,7 +973,7 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler {
       return true;
     }
 
-    public void assignToNonLeafTasks(LinkedList<TaskRequestEvent> taskRequests) {
+    public void assignToNonLeafTasks(LinkedList<TaskRequestEvent> taskRequests) throws InterruptedException {
       Collections.shuffle(taskRequests);
       String queryMasterHostAndPort = context.getMasterContext().getQueryMasterContext().getWorkerContext().
           getConnectionInfo().getHostAndQMPort();
@@ -1054,6 +1056,8 @@ public class DefaultTaskScheduler extends AbstractTaskScheduler {
             warn(LOG, "Canceled requests: " + requestProto.getTaskRequestCount()
                 + " by " + ExceptionUtils.getFullStackTrace(e));
             continue;
+          } catch (InterruptedException e) {
+            throw e;
           } catch (Exception e) {
             throw new TajoInternalError(e);
           }