You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Navis Ryu <na...@nexr.com> on 2014/05/27 09:05:59 UTC

Review Request 21922: Handover more details on exception in hiveserver2

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

Review request for hive.


Bugs: HIVE-7127
    https://issues.apache.org/jira/browse/HIVE-7127


Repository: hive-git


Description
-------

NO_PRECOMMIT_TEST

Currently, JDBC hands over exception message and error codes. But it's not helpful for debugging.
{noformat}
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121)
	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:231)
	at org.apache.hive.beeline.Commands.execute(Commands.java:736)
	at org.apache.hive.beeline.Commands.sql(Commands.java:657)
	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:889)
	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:744)
	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:459)
	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:442)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
{noformat}

With this patch, JDBC client can get more details on hiveserver2. 

{noformat}
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
	at org.apache.hive.service.cli.operation.SQLOperation.prepare(Unknown Source)
	at org.apache.hive.service.cli.operation.SQLOperation.run(Unknown Source)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(Unknown Source)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(Unknown Source)
	at org.apache.hive.service.cli.CLIService.executeStatementAsync(Unknown Source)
	at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(Unknown Source)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
	at org.apache.thrift.ProcessFunction.process(Unknown Source)
	at org.apache.thrift.TBaseProcessor.process(Unknown Source)
	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(Unknown Source)
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
{noformat}


Diffs
-----

  beeline/src/java/org/apache/hive/beeline/BeeLine.java dcdd6f2 
  beeline/src/main/resources/BeeLine.properties 697c29a 
  jdbc/src/java/org/apache/hive/jdbc/Utils.java 87fec11 
  service/src/java/org/apache/hive/service/cli/HiveSQLException.java 8c9496e 
  service/src/test/org/apache/hive/service/cli/TestHiveSQLException.java PRE-CREATION 
  shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java e6493eb 

Diff: https://reviews.apache.org/r/21922/diff/


Testing
-------


Thanks,

Navis Ryu


Re: Review Request 21922: Handover more details on exception in hiveserver2

Posted by Navis Ryu <na...@nexr.com>.

> On May 28, 2014, 6:58 p.m., Szehon Ho wrote:
> > service/src/java/org/apache/hive/service/cli/HiveSQLException.java, line 157
> > <https://reviews.apache.org/r/21922/diff/1/?file=594696#file594696line157>
> >
> >     Can we consider abstracting this kind of logic into an inner class, so enroll and toStackTrace become cleaner?
> >     
> >     Like ExceptionMetadata(ex, max);
> >          ExceptionMetadata(stringrep)
> >     
> >          String toString()
> >          String getClass
> >          String getMessage
> >          ..etc
> >

It's simple parsing logic and making another class seemed a little over engineering.


> On May 28, 2014, 6:58 p.m., Szehon Ho wrote:
> > service/src/java/org/apache/hive/service/cli/HiveSQLException.java, line 176
> > <https://reviews.apache.org/r/21922/diff/1/?file=594696#file594696line176>
> >
> >     Can we give more precise message?

Changed to return null, ignoring remaining stacktraces. 


> On May 28, 2014, 6:58 p.m., Szehon Ho wrote:
> > shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java, line 207
> > <https://reviews.apache.org/r/21922/diff/1/?file=594698#file594698line207>
> >
> >     Is this part of this JIRA?  If so, the description should probably reflect it.  If not, we should take it out , as the jira is about exception reporting

It's HIVE-6313. Mixed by mistake.


- Navis


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


On May 27, 2014, 7:05 a.m., Navis Ryu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21922/
> -----------------------------------------------------------
> 
> (Updated May 27, 2014, 7:05 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-7127
>     https://issues.apache.org/jira/browse/HIVE-7127
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> NO_PRECOMMIT_TEST
> 
> Currently, JDBC hands over exception message and error codes. But it's not helpful for debugging.
> {noformat}
> org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
> 	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121)
> 	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109)
> 	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:231)
> 	at org.apache.hive.beeline.Commands.execute(Commands.java:736)
> 	at org.apache.hive.beeline.Commands.sql(Commands.java:657)
> 	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:889)
> 	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:744)
> 	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:459)
> 	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:442)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
> {noformat}
> 
> With this patch, JDBC client can get more details on hiveserver2. 
> 
> {noformat}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
> 	at org.apache.hive.service.cli.operation.SQLOperation.prepare(Unknown Source)
> 	at org.apache.hive.service.cli.operation.SQLOperation.run(Unknown Source)
> 	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(Unknown Source)
> 	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(Unknown Source)
> 	at org.apache.hive.service.cli.CLIService.executeStatementAsync(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
> 	at org.apache.thrift.ProcessFunction.process(Unknown Source)
> 	at org.apache.thrift.TBaseProcessor.process(Unknown Source)
> 	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(Unknown Source)
> 	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> {noformat}
> 
> 
> Diffs
> -----
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java dcdd6f2 
>   beeline/src/main/resources/BeeLine.properties 697c29a 
>   jdbc/src/java/org/apache/hive/jdbc/Utils.java 87fec11 
>   service/src/java/org/apache/hive/service/cli/HiveSQLException.java 8c9496e 
>   service/src/test/org/apache/hive/service/cli/TestHiveSQLException.java PRE-CREATION 
>   shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java e6493eb 
> 
> Diff: https://reviews.apache.org/r/21922/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Navis Ryu
> 
>


Re: Review Request 21922: Handover more details on exception in hiveserver2

Posted by Szehon Ho <sz...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21922/#review44140
-----------------------------------------------------------


I have some comments below.


service/src/java/org/apache/hive/service/cli/HiveSQLException.java
<https://reviews.apache.org/r/21922/#comment78467>

    Duplicate null check



service/src/java/org/apache/hive/service/cli/HiveSQLException.java
<https://reviews.apache.org/r/21922/#comment78470>

    Can we consider abstracting this kind of logic into an inner class, so enroll and toStackTrace become cleaner?
    
    Like ExceptionMetadata(ex, max);
         ExceptionMetadata(stringrep)
    
         String toString()
         String getClass
         String getMessage
         ..etc
      



service/src/java/org/apache/hive/service/cli/HiveSQLException.java
<https://reviews.apache.org/r/21922/#comment78466>

    Can we give more precise message?



shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java
<https://reviews.apache.org/r/21922/#comment78465>

    Is this part of this JIRA?  If so, the description should probably reflect it.  If not, we should take it out , as the jira is about exception reporting


- Szehon Ho


On May 27, 2014, 7:05 a.m., Navis Ryu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21922/
> -----------------------------------------------------------
> 
> (Updated May 27, 2014, 7:05 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-7127
>     https://issues.apache.org/jira/browse/HIVE-7127
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> NO_PRECOMMIT_TEST
> 
> Currently, JDBC hands over exception message and error codes. But it's not helpful for debugging.
> {noformat}
> org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
> 	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121)
> 	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109)
> 	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:231)
> 	at org.apache.hive.beeline.Commands.execute(Commands.java:736)
> 	at org.apache.hive.beeline.Commands.sql(Commands.java:657)
> 	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:889)
> 	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:744)
> 	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:459)
> 	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:442)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
> {noformat}
> 
> With this patch, JDBC client can get more details on hiveserver2. 
> 
> {noformat}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
> 	at org.apache.hive.service.cli.operation.SQLOperation.prepare(Unknown Source)
> 	at org.apache.hive.service.cli.operation.SQLOperation.run(Unknown Source)
> 	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(Unknown Source)
> 	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(Unknown Source)
> 	at org.apache.hive.service.cli.CLIService.executeStatementAsync(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
> 	at org.apache.thrift.ProcessFunction.process(Unknown Source)
> 	at org.apache.thrift.TBaseProcessor.process(Unknown Source)
> 	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(Unknown Source)
> 	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> {noformat}
> 
> 
> Diffs
> -----
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java dcdd6f2 
>   beeline/src/main/resources/BeeLine.properties 697c29a 
>   jdbc/src/java/org/apache/hive/jdbc/Utils.java 87fec11 
>   service/src/java/org/apache/hive/service/cli/HiveSQLException.java 8c9496e 
>   service/src/test/org/apache/hive/service/cli/TestHiveSQLException.java PRE-CREATION 
>   shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java e6493eb 
> 
> Diff: https://reviews.apache.org/r/21922/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Navis Ryu
> 
>


Re: Review Request 21922: Handover more details on exception in hiveserver2

Posted by Szehon Ho <sz...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21922/#review44221
-----------------------------------------------------------

Ship it!


Thanks , its better to be clearer in my opinion, but its personal prerference.

- Szehon Ho


On May 29, 2014, 12:41 a.m., Navis Ryu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21922/
> -----------------------------------------------------------
> 
> (Updated May 29, 2014, 12:41 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-7127
>     https://issues.apache.org/jira/browse/HIVE-7127
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> NO_PRECOMMIT_TEST
> 
> Currently, JDBC hands over exception message and error codes. But it's not helpful for debugging.
> {noformat}
> org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
> 	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121)
> 	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109)
> 	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:231)
> 	at org.apache.hive.beeline.Commands.execute(Commands.java:736)
> 	at org.apache.hive.beeline.Commands.sql(Commands.java:657)
> 	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:889)
> 	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:744)
> 	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:459)
> 	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:442)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
> {noformat}
> 
> With this patch, JDBC client can get more details on hiveserver2. 
> 
> {noformat}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
> 	at org.apache.hive.service.cli.operation.SQLOperation.prepare(Unknown Source)
> 	at org.apache.hive.service.cli.operation.SQLOperation.run(Unknown Source)
> 	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(Unknown Source)
> 	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(Unknown Source)
> 	at org.apache.hive.service.cli.CLIService.executeStatementAsync(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
> 	at org.apache.thrift.ProcessFunction.process(Unknown Source)
> 	at org.apache.thrift.TBaseProcessor.process(Unknown Source)
> 	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(Unknown Source)
> 	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> {noformat}
> 
> 
> Diffs
> -----
> 
>   jdbc/src/java/org/apache/hive/jdbc/Utils.java 87fec11 
>   service/src/java/org/apache/hive/service/cli/HiveSQLException.java 8c9496e 
>   service/src/test/org/apache/hive/service/cli/TestHiveSQLException.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21922/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Navis Ryu
> 
>


Re: Review Request 21922: Handover more details on exception in hiveserver2

Posted by Navis Ryu <na...@nexr.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21922/
-----------------------------------------------------------

(Updated June 26, 2014, 5:49 a.m.)


Review request for hive.


Changes
-------

Just rebase


Bugs: HIVE-7127
    https://issues.apache.org/jira/browse/HIVE-7127


Repository: hive-git


Description
-------

NO_PRECOMMIT_TEST

Currently, JDBC hands over exception message and error codes. But it's not helpful for debugging.
{noformat}
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121)
	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:231)
	at org.apache.hive.beeline.Commands.execute(Commands.java:736)
	at org.apache.hive.beeline.Commands.sql(Commands.java:657)
	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:889)
	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:744)
	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:459)
	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:442)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
{noformat}

With this patch, JDBC client can get more details on hiveserver2. 

{noformat}
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
	at org.apache.hive.service.cli.operation.SQLOperation.prepare(Unknown Source)
	at org.apache.hive.service.cli.operation.SQLOperation.run(Unknown Source)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(Unknown Source)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(Unknown Source)
	at org.apache.hive.service.cli.CLIService.executeStatementAsync(Unknown Source)
	at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(Unknown Source)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
	at org.apache.thrift.ProcessFunction.process(Unknown Source)
	at org.apache.thrift.TBaseProcessor.process(Unknown Source)
	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(Unknown Source)
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
{noformat}


Diffs (updated)
-----

  jdbc/src/java/org/apache/hive/jdbc/Utils.java f0834bd 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 401e639 
  ql/src/java/org/apache/hadoop/hive/ql/processors/CommandProcessorResponse.java 2eb4438 
  service/src/java/org/apache/hive/service/cli/HiveSQLException.java 8c9496e 
  service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java f708650 
  service/src/java/org/apache/hive/service/cli/operation/Operation.java d6651ba 
  service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java 5e7ee93 
  service/src/test/org/apache/hive/service/cli/TestHiveSQLException.java PRE-CREATION 

Diff: https://reviews.apache.org/r/21922/diff/


Testing
-------


Thanks,

Navis Ryu


Re: Review Request 21922: Handover more details on exception in hiveserver2

Posted by Navis Ryu <na...@nexr.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21922/
-----------------------------------------------------------

(Updated May 29, 2014, 12:41 a.m.)


Review request for hive.


Changes
-------

Addressed comments.


Bugs: HIVE-7127
    https://issues.apache.org/jira/browse/HIVE-7127


Repository: hive-git


Description
-------

NO_PRECOMMIT_TEST

Currently, JDBC hands over exception message and error codes. But it's not helpful for debugging.
{noformat}
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121)
	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:231)
	at org.apache.hive.beeline.Commands.execute(Commands.java:736)
	at org.apache.hive.beeline.Commands.sql(Commands.java:657)
	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:889)
	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:744)
	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:459)
	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:442)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
{noformat}

With this patch, JDBC client can get more details on hiveserver2. 

{noformat}
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'createa' 'asd' '<EOF>'
	at org.apache.hive.service.cli.operation.SQLOperation.prepare(Unknown Source)
	at org.apache.hive.service.cli.operation.SQLOperation.run(Unknown Source)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(Unknown Source)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(Unknown Source)
	at org.apache.hive.service.cli.CLIService.executeStatementAsync(Unknown Source)
	at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(Unknown Source)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(Unknown Source)
	at org.apache.thrift.ProcessFunction.process(Unknown Source)
	at org.apache.thrift.TBaseProcessor.process(Unknown Source)
	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(Unknown Source)
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
{noformat}


Diffs (updated)
-----

  jdbc/src/java/org/apache/hive/jdbc/Utils.java 87fec11 
  service/src/java/org/apache/hive/service/cli/HiveSQLException.java 8c9496e 
  service/src/test/org/apache/hive/service/cli/TestHiveSQLException.java PRE-CREATION 

Diff: https://reviews.apache.org/r/21922/diff/


Testing
-------


Thanks,

Navis Ryu