drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [3/4] drill git commit: DRILL-1772: Improve error propagation to client for Foreman.
Date Mon, 01 Dec 2014 05:45:34 GMT
DRILL-1772: Improve error propagation to client for Foreman.


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

Branch: refs/heads/master
Commit: ec486fc61612c13453f5773fe3ffcc8de0777abf
Parents: 3d836b5
Author: Jacques Nadeau <jacques@apache.org>
Authored: Fri Nov 21 14:07:29 2014 -0800
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Sun Nov 30 20:02:33 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java   | 4 ++--
 .../main/java/org/apache/drill/exec/work/foreman/Foreman.java    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/ec486fc6/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java
index 5506e92..710418b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java
@@ -117,7 +117,7 @@ public class DrillSqlWorker {
     try {
       sqlNode = planner.parse(sql);
     } catch (SqlParseException e) {
-      throw new QueryInputException("Failure parsing SQL.", e);
+      throw new QueryInputException("Failure parsing SQL. " + e.getMessage(), e);
     }
 
     AbstractSqlHandler handler;
@@ -144,7 +144,7 @@ public class DrillSqlWorker {
     try{
       return handler.getPlan(sqlNode);
     }catch(ValidationException e){
-      throw new QueryInputException("Failure validating SQL.", e);
+      throw new QueryInputException("Failure validating SQL. " + e.getMessage(), e);
     } catch (IOException | RelConversionException e) {
       throw new QueryInputException("Failure handling SQL.", e);
     }

http://git-wip-us.apache.org/repos/asf/drill/blob/ec486fc6/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
index 3e1393c..6abba0b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
@@ -435,7 +435,7 @@ public class Foreman implements Runnable, Closeable, Comparable<Object>
{
         assert exception != null;
         recordNewState(QueryState.FAILED);
         cancelExecutingFragments();
-        DrillPBError error = ErrorHelper.logAndConvertError(context.getCurrentEndpoint(),
"Query failed.", exception, logger);
+        DrillPBError error = ErrorHelper.logAndConvertError(context.getCurrentEndpoint(),
"Query failed: "+ exception.getMessage(), exception, logger);
         QueryResult result = QueryResult //
           .newBuilder() //
           .addError(error) //


Mime
View raw message