drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdelhakim deneche" <adene...@gmail.com>
Subject Re: Review Request 31748: DRILL-2387: Enhance exception reporting
Date Tue, 17 Mar 2015 02:09:04 GMT


> On March 17, 2015, 12:04 a.m., abdelhakim deneche wrote:
> > exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java, line 173
> > <https://reviews.apache.org/r/31748/diff/2/?file=887566#file887566line173>
> >
> >     This is a great improvement. Would it make sense, in non verbose mode, to display
all exceptions' messages (without the stack trace associated) ? In some cases, the root error
message doesn't contain enough information for the end user.
> >     
> >     For example, calling:
> >     ```
> >     logAndConvertMessageError(DrillbitEndpoint.newBuilder().setAddress("host1").setControlPort(1234).build(),
> >           "Error message",
> >           new Exception("exception 1", new Exception("exception 2", new Exception("exception
3"))), logger, false);
> >     ```
> >     
> >     Should display:
> >     ```
> >     Error message
> >     exception 1
> >     exception 2
> >     exception 3
> >     ```
> >     
> >     But displays, in non verbose mode:
> >     ```
> >     Error message
> >     exception3
> >     ```
> 
> Sudheesh Katkam wrote:
>     The problem is that the root message does not contain enough information in **some**
cases. Since we wrap exceptions, in most cases the messages from non-root cause are not useful.

Let's give it a try, if the "clutter" from the wrapping exceptions is not too much then at
least we are sure the user **always** gets enough information. Just make sure to ignore empty
messages


> On March 17, 2015, 12:04 a.m., abdelhakim deneche wrote:
> > distribution/src/resources/sqlline, line 44
> > <https://reviews.apache.org/r/31748/diff/2/?file=887565#file887565line44>
> >
> >     Interesting, but it only colors the default sqlline error message:
> >     ```
> >     Error: exception while executing query: Failure while executing query. (state=,code=0)
> >     ```
> >     If we could also color Drill error messages, this would be a great additions.
Otherwise, it may confuse the end user.
> 
> Sudheesh Katkam wrote:
>     Will make the change.

Nice change indeed!


- abdelhakim


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31748/#review76676
-----------------------------------------------------------


On March 17, 2015, 12:52 a.m., Sudheesh Katkam wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31748/
> -----------------------------------------------------------
> 
> (Updated March 17, 2015, 12:52 a.m.)
> 
> 
> Review request for drill and Jacques Nadeau.
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> Gather messages while unwrapping an exception 
> 
> (+ color to sqlline in default mode)
> 
> 
> Diffs
> -----
> 
>   distribution/src/resources/sqlline 0852fba 
>   exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java 0773d6c 
>   exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java 378e81a

>   exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillCursor.java fbe611f 
>   exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillResultSet.java 77b2c37 
> 
> Diff: https://reviews.apache.org/r/31748/diff/
> 
> 
> Testing
> -------
> 
> input.json has an integer with a leading zero:
> 
> Currently the error message shows:
> ```
> $ select * from cp.`jsoninput/input.json`;
> Exception (no rows returned): org.apache.drill.exec.rpc.RpcException: Query stopped.
> Invalid numeric value: Leading zeroes not allowed
>  at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@d4ef9fe; line: 0, column:
16]
> [Error c50f1dd4-c3b6-4185-8c65-27cf34edf1a2 on 192.168.168.91:31013 ]
> ```
> 
> Set the verbose flag to see:
> ```
> $ alter session set `exec.errors.verbose`=true;
> $ select * from cp.`jsoninput/input.json`;
> Exception (no rows returned): org.apache.drill.exec.rpc.RpcException: Query stopped.
> ->Error parsing JSON. - Parser was at record: 1 column: 16
> -->Invalid numeric value: Leading zeroes not allowed
>  at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@307f7f7b; line: 0, column:
16]
> [Error 63196117-3008-4c26-9526-9cca1713406d on 192.168.168.91:31013 ]
> 
>   (org.apache.drill.common.exceptions.DrillRuntimeException) Error parsing JSON. - Parser
was at record: 1 column: 16
>     org.apache.drill.exec.store.easy.json.JSONRecordReader.handleAndRaise():102
>     org.apache.drill.exec.store.easy.json.JSONRecordReader.next():149
>     org.apache.drill.exec.physical.impl.ScanBatch.next():165
>     org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next():118
>     org.apache.drill.exec.physical.impl.BaseRootExec.next():67
>     org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():97
>     org.apache.drill.exec.physical.impl.BaseRootExec.next():57
>     org.apache.drill.exec.work.fragment.FragmentExecutor.run():121
>     org.apache.drill.exec.work.WorkManager$RunnableWrapper.run():303
>     .......():0
>   Caused By (com.fasterxml.jackson.core.JsonParseException) Invalid numeric value: Leading
zeroes not allowed
>  at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@307f7f7b; line: 0, column:
16]
>     com.fasterxml.jackson.core.JsonParser._constructError():1419
>     com.fasterxml.jackson.core.base.ParserMinimalBase._reportError():508
>     com.fasterxml.jackson.core.base.ParserBase.reportInvalidNumber():943
>     com.fasterxml.jackson.core.json.UTF8StreamJsonParser._verifyNoLeadingZeroes():1348
>     com.fasterxml.jackson.core.json.UTF8StreamJsonParser._parsePosNumber():1195
>     com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken():726
>     org.apache.drill.exec.vector.complex.fn.JsonReader.writeData():240
>     org.apache.drill.exec.vector.complex.fn.JsonReader.writeDataSwitch():208
>     org.apache.drill.exec.vector.complex.fn.JsonReader.writeToVector():182
>     org.apache.drill.exec.vector.complex.fn.JsonReader.write():156
>     org.apache.drill.exec.store.easy.json.JSONRecordReader.next():125
>     org.apache.drill.exec.physical.impl.ScanBatch.next():165
>     org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next():118
>     org.apache.drill.exec.physical.impl.BaseRootExec.next():67
>     org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():97
>     org.apache.drill.exec.physical.impl.BaseRootExec.next():57
>     org.apache.drill.exec.work.fragment.FragmentExecutor.run():121
>     org.apache.drill.exec.work.WorkManager$RunnableWrapper.run():303
>     .......():0
> ```
> 
> 
> Thanks,
> 
> Sudheesh Katkam
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message