You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/09/20 16:55:01 UTC

[GitHub] [drill] vvysotskyi opened a new pull request #2319: DRILL-8002: Expose clear error message for the case of errors from ElasticSearch

vvysotskyi opened a new pull request #2319:
URL: https://github.com/apache/drill/pull/2319


   # [DRILL-8002](https://issues.apache.org/jira/browse/DRILL-8002): Expose clear error message for the case of errors from ElasticSearch
   
   ## Description
   See Jira ticket for details
   
   ## Documentation
   NA
   
   ## Testing
   Added UT
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on a change in pull request #2319: DRILL-8002: Expose clear error message for the case of errors from ElasticSearch

Posted by GitBox <gi...@apache.org>.
luocooong commented on a change in pull request #2319:
URL: https://github.com/apache/drill/pull/2319#discussion_r712611437



##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/enumerable/EnumerableRecordReader.java
##########
@@ -99,7 +103,9 @@ private void setup(OperatorContext context) {
             .iterator();
       }
     } catch (CompileException | IOException | ClassTransformationException | ReflectiveOperationException e) {
-      throw new RuntimeException("Exception happened when executing generated code", e.getCause());
+      logger.error("Exception happened when executing generated code", e);
+      Throwable rootCause = Throwables.getRootCause(e);
+      throw new DrillRuntimeException(rootCause.getMessage(), rootCause);

Review comment:
       Could you please paste the error message before and after the revision ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] vvysotskyi commented on a change in pull request #2319: DRILL-8002: Expose clear error message for the case of errors from ElasticSearch

Posted by GitBox <gi...@apache.org>.
vvysotskyi commented on a change in pull request #2319:
URL: https://github.com/apache/drill/pull/2319#discussion_r712734837



##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/enumerable/EnumerableRecordReader.java
##########
@@ -99,7 +103,9 @@ private void setup(OperatorContext context) {
             .iterator();
       }
     } catch (CompileException | IOException | ClassTransformationException | ReflectiveOperationException e) {
-      throw new RuntimeException("Exception happened when executing generated code", e.getCause());
+      logger.error("Exception happened when executing generated code", e);
+      Throwable rootCause = Throwables.getRootCause(e);
+      throw new DrillRuntimeException(rootCause.getMessage(), rootCause);

Review comment:
       Before:
   ```
   EXECUTION_ERROR ERROR: Exception happened when executing generated code
   ```
   And now it prints actual reason, for example for the unit test I added it will be the following:
   ```
   EXECUTION_ERROR ERROR: Field full_name123 not defined for employee
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on a change in pull request #2319: DRILL-8002: Expose clear error message for the case of errors from ElasticSearch

Posted by GitBox <gi...@apache.org>.
luocooong commented on a change in pull request #2319:
URL: https://github.com/apache/drill/pull/2319#discussion_r712753255



##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/enumerable/EnumerableRecordReader.java
##########
@@ -99,7 +103,9 @@ private void setup(OperatorContext context) {
             .iterator();
       }
     } catch (CompileException | IOException | ClassTransformationException | ReflectiveOperationException e) {
-      throw new RuntimeException("Exception happened when executing generated code", e.getCause());
+      logger.error("Exception happened when executing generated code", e);
+      Throwable rootCause = Throwables.getRootCause(e);
+      throw new DrillRuntimeException(rootCause.getMessage(), rootCause);

Review comment:
       Thanks.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] vvysotskyi merged pull request #2319: DRILL-8002: Expose clear error message for the case of errors from ElasticSearch

Posted by GitBox <gi...@apache.org>.
vvysotskyi merged pull request #2319:
URL: https://github.com/apache/drill/pull/2319


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org