You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Deneche A. Hakim (JIRA)" <ji...@apache.org> on 2015/03/30 04:25:53 UTC

[jira] [Created] (DRILL-2617) Errors in the execution stack will cause DeferredException to throw an IllegalStateException

Deneche A. Hakim created DRILL-2617:
---------------------------------------

             Summary: Errors in the execution stack will cause DeferredException to throw an IllegalStateException
                 Key: DRILL-2617
                 URL: https://issues.apache.org/jira/browse/DRILL-2617
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Flow
    Affects Versions: 0.8.0
            Reporter: Deneche A. Hakim
            Assignee: Chris Westin
             Fix For: 0.9.0


When a query fails while executing, the following events happen:
- the exception is added to {{FragmentContext.deferredException}}
- the {{FragmentExecutor}} reports the failure to the client through the {{Foreman}}
- the {{FragmentExecutor}} closes the {{DeferredException}}
- {{DeferredException.close()}} throws back the original exception
- {{FragmentExecutor.run()}} catches the exception and try to add it to the {{DeferredException}}
- {{DeferredException.addException()}} throws an {{IllegalStateException}} because it's already closed.

You can reproduce this by querying the following json file, which contains an extra ":"
{code}
{ "a1": 0 , "b1": "a"}
{ "a1": 1 , "b1": "b"}
{ "a1": 2 , "b1": "c"}
{ "a1":: 3 , "b1": "c"}
{code}

Sqlline will dispaly both the error message sent by the Foreman and the IllegalStateException:
{noformat}
0: jdbc:drill:zk=local> select * from `t.json`;
Query failed: Query stopped., Unexpected character (':' (code 58)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@161188d3; line: 3, column: 9] [ b55f7d53-0e88-456f-bb12-160cacae9222 on administorsmbp2.attlocal.net:31010 ]


Error: exception while executing query: Failure while executing query. (state=,code=0)
0: jdbc:drill:zk=local> Exception in thread "WorkManager-2" java.lang.IllegalStateException
	at com.google.common.base.Preconditions.checkState(Preconditions.java:133)
	at org.apache.drill.common.DeferredException.addException(DeferredException.java:47)
	at org.apache.drill.common.DeferredException.addThrowable(DeferredException.java:61)
	at org.apache.drill.exec.ops.FragmentContext.fail(FragmentContext.java:135)
	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:181)
	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)