You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Deneche A. Hakim (JIRA)" <ji...@apache.org> on 2015/05/05 18:02:59 UTC

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

     [ https://issues.apache.org/jira/browse/DRILL-2617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deneche A. Hakim resolved DRILL-2617.
-------------------------------------
    Resolution: Fixed

DeferredException.close() is no longer called by FragmentExecutor. The only class that calls DeferredException.close() is EventProcessor but the exception is only used as a local variable and once the exception is closed, no other method is called.

> 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: Deneche A. Hakim
>             Fix For: 1.0.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)