> 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. > > abdelhakim deneche wrote: > 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
Sounds good. - Sudheesh ----------------------------------------------------------- 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 > >
