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



distribution/src/resources/sqlline
<https://reviews.apache.org/r/31748/#comment124309>

    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.



exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
<https://reviews.apache.org/r/31748/#comment124310>

    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
    ```


- abdelhakim deneche


On March 6, 2015, 7:08 p.m., Sudheesh Katkam wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31748/
> -----------------------------------------------------------
> 
> (Updated March 6, 2015, 7:08 p.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 
> 
> 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
> 
>

Reply via email to