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 2018/07/13 10:52:29 UTC

[GitHub] arina-ielchiieva commented on a change in pull request #1379: DRILL-6591: Show Exception for failed queries submitted in WebUI

arina-ielchiieva commented on a change in pull request #1379: DRILL-6591: Show Exception for failed queries submitted in WebUI
URL: https://github.com/apache/drill/pull/1379#discussion_r202314199
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
 ##########
 @@ -97,23 +99,29 @@ public QueryResult run(final WorkManager workManager, final WebUserConnection we
 
     //Fail if nearly out of heap space
     if (nearlyOutOfHeapSpace) {
+      UserException almostOutOfHeapException = UserException.resourceError(
+          new Throwable(
+              "There is not enough heap memory to run this query using the web interface. "
+              + "Please try a query with fewer columns or with a filter or limit condition to limit the data returned. "
+              + "You can also try an ODBC/JDBC client. "
+              )
+          )
+        .build(logger);
+      //Add event
       workManager.getBee().getForemanForQueryId(queryId)
-        .addToEventQueue(QueryState.FAILED,
-            UserException.resourceError(
-                new Throwable(
-                    "There is not enough heap memory to run this query using the web interface. "
-                    + "Please try a query with fewer columns or with a filter or limit condition to limit the data returned. "
-                    + "You can also try an ODBC/JDBC client. "
-                    )
-                )
-              .build(logger)
-            );
+        .addToEventQueue(QueryState.FAILED, almostOutOfHeapException);
+      //Return NearlyOutOfHeap exception
+      throw almostOutOfHeapException;
     }
 
     if (logger.isTraceEnabled()) {
 
 Review comment:
   I know it was before but this check is not necessary.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services