From b8fd24130c993d25e965583fcbf43e4e5c02d204 Mon Sep 17 00:00:00 2001 From: Jinho Kim Date: Thu, 28 Apr 2016 11:14:24 +0900 Subject: [PATCH 1/2] TAJO-2140: TajoInternalError does not contains reason stack trace. --- .../main/java/org/apache/tajo/exception/TajoInternalError.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4decd217c6..859d5a3b1c 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 TajoInternalError(String message) { } public TajoInternalError(Throwable t) { - super(ResultCode.INTERNAL_ERROR, t.getMessage()); + super(ResultCode.INTERNAL_ERROR, t, t.getMessage()); } public TajoInternalError(TajoException t) { From 4501b48f3b519349d91b1998d9b31befa3febbe3 Mon Sep 17 00:00:00 2001 From: Jinho Kim Date: Thu, 28 Apr 2016 13:36:33 +0900 Subject: [PATCH 2/2] remove interrupted message when DefaultTaskScheduler is stopped --- .../org/apache/tajo/querymaster/DefaultTaskScheduler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 cdf7c5e0c6..401ba0a3a6 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 int compare(HostVolumeMapping v1, HostVolumeMapping v2) { return attemptId; } - public void assignToLeafTasks(LinkedList taskRequests) { + public void assignToLeafTasks(LinkedList taskRequests) throws InterruptedException { Collections.shuffle(taskRequests); LinkedList remoteTaskRequests = new LinkedList<>(); String queryMasterHostAndPort = context.getMasterContext().getQueryMasterContext().getWorkerContext(). @@ -934,6 +934,8 @@ public void assignToLeafTasks(LinkedList taskRequests) { 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 @@ private boolean checkIfInterQuery(MasterPlan masterPlan, ExecutionBlock block) { return true; } - public void assignToNonLeafTasks(LinkedList taskRequests) { + public void assignToNonLeafTasks(LinkedList taskRequests) throws InterruptedException { Collections.shuffle(taskRequests); String queryMasterHostAndPort = context.getMasterContext().getQueryMasterContext().getWorkerContext(). getConnectionInfo().getHostAndQMPort(); @@ -1054,6 +1056,8 @@ public void assignToNonLeafTasks(LinkedList taskRequests) { warn(LOG, "Canceled requests: " + requestProto.getTaskRequestCount() + " by " + ExceptionUtils.getFullStackTrace(e)); continue; + } catch (InterruptedException e) { + throw e; } catch (Exception e) { throw new TajoInternalError(e); }