drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ve...@apache.org
Subject [1/5] drill git commit: DRILL-1969: Improve the error message displayed when querying Hive views from Drill
Date Fri, 16 Jan 2015 23:14:55 GMT
Repository: drill
Updated Branches:
  refs/heads/master d60850bcc -> bd4d669d1


DRILL-1969: Improve the error message displayed when querying Hive views from Drill


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

Branch: refs/heads/master
Commit: fe6f7efe75c97e78392231128b1a6a4971a262c5
Parents: d60850b
Author: vkorukanti <venki.korukanti@gmail.com>
Authored: Fri Jan 9 10:39:45 2015 -0800
Committer: vkorukanti <venki.korukanti@gmail.com>
Committed: Fri Jan 16 14:03:31 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/store/hive/HiveStoragePlugin.java | 3 ++-
 .../main/java/org/apache/drill/exec/work/foreman/Foreman.java    | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/fe6f7efe/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePlugin.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePlugin.java
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePlugin.java
index a3d4583..f4baf3b 100644
--- a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePlugin.java
+++ b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePlugin.java
@@ -71,7 +71,8 @@ public class HiveStoragePlugin extends AbstractStoragePlugin {
     HiveReadEntry hiveReadEntry = selection.getListWith(new ObjectMapper(), new TypeReference<HiveReadEntry>(){});
     try {
       if (hiveReadEntry.getJdbcTableType() == TableType.VIEW) {
-        throw new UnsupportedOperationException("Querying Hive views from Drill is not supported
in current version.");
+        throw new UnsupportedOperationException(
+            "Querying views created in Hive from Drill is not supported in current version.");
       }
 
       return new HiveScan(hiveReadEntry, this, columns);

http://git-wip-us.apache.org/repos/asf/drill/blob/fe6f7efe/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 e10a6aa..fcf5b91 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
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.exceptions.ExecutionSetupException;
 import org.apache.drill.common.logical.LogicalPlan;
@@ -438,7 +439,8 @@ public class Foreman implements Runnable, Closeable, Comparable<Object>
{
         assert exception != null;
         recordNewState(QueryState.FAILED);
         cancelExecutingFragments();
-        DrillPBError error = ErrorHelper.logAndConvertError(context.getCurrentEndpoint(),
"Query failed: "+ exception.getMessage(), exception, logger);
+        DrillPBError error = ErrorHelper.logAndConvertError(context.getCurrentEndpoint(),
+            ExceptionUtils.getRootCauseMessage(exception), exception, logger);
         QueryResult result = QueryResult //
           .newBuilder() //
           .addError(error) //


Mime
View raw message