Github user bitblender commented on a diff in the pull request:
https://github.com/apache/drill/pull/921#discussion_r148871345
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java ---
@@ -251,6 +252,11 @@ public void run() {
final String originalName = currentThread.getName();
currentThread.setName(queryIdString + ":foreman");
+ try {
+ checkForemanState();
+ } catch (ForemanException e) {
+ addToEventQueue(QueryState.FAILED, new ForemanException("Query
submission failed since foreman is shutting down"));
--- End diff --
why are you not just adding 'e' to the eventQueue ? why do you have to
create a new ForemanException object?
---