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

[jira] [Commented] (DRILL-1728) Better error messages on Drill JSON read error

    [ https://issues.apache.org/jira/browse/DRILL-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379057#comment-14379057 ] 

Khurram Faraaz commented on DRILL-1728:
---------------------------------------

I see a similar Exception when I do select * from a JSON file, note that I had set json.all_text_mode to true.

{code}
0: jdbc:drill:> alter session set `store.json.all_text_mode`=true;
+------------+------------+
|     ok     |  summary   |
+------------+------------+
| true       | store.json.all_text_mode updated. |
+------------+------------+
1 row selected (0.023 seconds)
0: jdbc:drill:> select * from `testJsnData.json`;
Query failed: Query stopped., You tried to start when you are using a ValueWriter of type NullableVarCharWriterImpl. [ 27dd0514-168c-4216-bd9b-3f13285ab18e on centos-01.qa.lab:31010 ]

Error: exception while executing query: Failure while executing query. (state=,code=0)

Snippet from drillbit.log 

2015-03-25 00:23:42,472 [2aedfff0-fa82-1819-1fc0-996b3eb549f2:frag:0:0] ERROR o.a.d.e.w.f.AbstractStatusReporter - Error 1a697074-5369-4a7a-abcf-97eab9d9ee39: Failure while running fragment.
java.lang.IllegalStateException: You tried to start when you are using a ValueWriter of type NullableVarCharWriterImpl.
        at org.apache.drill.exec.vector.complex.impl.AbstractFieldWriter.start(AbstractFieldWriter.java:97) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.vector.complex.impl.NullableVarCharWriterImpl.start(NullableVarCharWriterImpl.java:88) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.vector.complex.fn.JsonReader.writeDataAllText(JsonReader.java:307) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.vector.complex.fn.JsonReader.writeDataAllText(JsonReader.java:332) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.vector.complex.fn.JsonReader.writeDataSwitch(JsonReader.java:206) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.vector.complex.fn.JsonReader.writeToVector(JsonReader.java:182) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.vector.complex.fn.JsonReader.write(JsonReader.java:156) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.store.easy.json.JSONRecordReader.next(JSONRecordReader.java:125) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:165) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:67) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:97) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:121) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:303) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
2015-03-25 00:23:42,472 [2aedfff0-fa82-1819-1fc0-996b3eb549f2:frag:0:0] INFO  o.a.drill.exec.work.foreman.Foreman - State change requested.  RUNNING --> FAILED
org.apache.drill.exec.rpc.RemoteRpcException: Failure while running fragment., You tried to start when you are using a ValueWriter of type NullableVarCharWriterImpl. [ 1a697074-5369-4a7a-abcf-97eab9d9ee39 on centos-01.qa.lab:31010 ]
[ 1a697074-5369-4a7a-abcf-97eab9d9ee39 on centos-01.qa.lab:31010 ]

 at org.apache.drill.exec.work.foreman.QueryManager.statusUpdate(QueryManager.java:95) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.QueryManager$RootStatusReporter.statusChange(QueryManager.java:154) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:114) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.fragment.AbstractStatusReporter.fail(AbstractStatusReporter.java:110) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.fragment.FragmentExecutor.internalFail(FragmentExecutor.java:176) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:123) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:303) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
2015-03-25 00:23:42,484 [2aedfff0-fa82-1819-1fc0-996b3eb549f2:frag:0:0] INFO  o.a.drill.exec.work.foreman.Foreman - State change requested.  FAILED --> COMPLETED
2015-03-25 00:23:42,484 [2aedfff0-fa82-1819-1fc0-996b3eb549f2:frag:0:0] WARN  o.a.drill.exec.work.foreman.Foreman - Dropping request to move to COMPLETED state as query is already at FAILED state (which is terminal).
2015-03-25 00:23:42,485 [2aedfff0-fa82-1819-1fc0-996b3eb549f2:frag:0:0] ERROR o.a.drill.exec.work.foreman.Foreman - Error b29342fc-396f-4fb0-a4fc-a6038f7da4ad: RemoteRpcException: Failure while running fragment., You tried to start when you are using a ValueWriter of type NullableVarCharWriterImpl. [ 1a697074-5369-4a7a-abcf-97eab9d9ee39 on centos-01.qa.lab:31010 ]
[ 1a697074-5369-4a7a-abcf-97eab9d9ee39 on centos-01.qa.lab:31010 ]

org.apache.drill.exec.rpc.RemoteRpcException: Failure while running fragment., You tried to start when you are using a ValueWriter of type NullableVarCharWriterImpl. [ 1a697074-5369-4a7a-abcf-97eab9d9ee39 on centos-01.qa.lab:31010 ]
[ 1a697074-5369-4a7a-abcf-97eab9d9ee39 on centos-01.qa.lab:31010 ]
{code}

Data that I used in my test was

{code}
{"key":12345}
{"key":-123456}
{"key":0}
{"key":-99999.999}
{"key":99999999.9876}
{"key":"Hello World!"}
{"key":"this is a long string, not very long though!"}
{"key":true}
{"key":false}
{"key":null}
{"key":2147483647}
{"key":1100110010101010100101010101010101}
{"key":"2008-1-23 14:24:23"}
{"key":"2008-2-23"}
{"key":"10:20:30.123"}
{"key":-1}
{"key":3.147}
{"key":{"id":1000.997}}
{"key":[1,2,3,4,-1,0,135.987,99999,-9999.876,2147483647,"test string",null,true,false]}
{"key":{null}}
{"key":[null]}
{"key":"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ    12345 aeiou"}
{code}

> Better error messages on Drill JSON read error
> ----------------------------------------------
>
>                 Key: DRILL-1728
>                 URL: https://issues.apache.org/jira/browse/DRILL-1728
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - JSON
>            Reporter: Tomer Shiran
>            Assignee: Jason Altekruse
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> {code}
> 0: jdbc:drill:zk=localhost:2181> SELECT * FROM dfs.root.`Users/tshiran/Development/demo/data/yelp/business.json` WHERE true and REPEATED_CONTAINS(categories, 'Australian');
> +-------------+--------------+------------+------------+------------+------------+--------------+------------+------------+------------+------------+------------+------------+------------+---------------+
> | business_id | full_address |   hours    |    open    | categories |    city    | review_count |    name    | longitude  |   state    |   stars    |  latitude  | attributes |    type    | neighborhoods |
> +-------------+--------------+------------+------------+------------+------------+--------------+------------+------------+------------+------------+------------+------------+------------+---------------+
> Query failed: Query stopeed., You tried to start when you are using a ValueWriter of type NullableBitWriterImpl. [ e5bafa1e-6226-443d-80fd-51e18f330899 on 172.17.3.132:31010 ]
> java.lang.RuntimeException: java.sql.SQLException: Failure while executing query.
> 	at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514)
> 	at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148)
> 	at sqlline.SqlLine.print(SqlLine.java:1809)
> 	at sqlline.SqlLine$Commands.execute(SqlLine.java:3766)
> 	at sqlline.SqlLine$Commands.sql(SqlLine.java:3663)
> 	at sqlline.SqlLine.dispatch(SqlLine.java:889)
> 	at sqlline.SqlLine.begin(SqlLine.java:763)
> 	at sqlline.SqlLine.start(SqlLine.java:498)
> 	at sqlline.SqlLine.main(SqlLine.java:460)
> {code}



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