[ 
https://issues.apache.org/jira/browse/HIVE-23526?focusedWorklogId=441296&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-441296
 ]

ASF GitHub Bot logged work on HIVE-23526:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Jun/20 14:31
            Start Date: 04/Jun/20 14:31
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on a change in pull request #1029:
URL: https://github.com/apache/hive/pull/1029#discussion_r435304118



##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
##########
@@ -198,9 +198,9 @@ private void closeStatementIfNeeded() throws SQLException {
     } catch (SQLException e) {
       throw e;
     } catch (TApplicationException tae) {
-      String errorMsg = tae.getMessage();
+      String errorMsg = "Failed to close statement";
       if (tae.getType() == TApplicationException.BAD_SEQUENCE_ID) {
-        errorMsg = "Mismatch thrift sequence id. A previous call to the Thrift 
library failed"
+        errorMsg += ". Mismatch thrift sequence id. A previous call to the 
Thrift library failed"

Review comment:
       Lol.  I'm so sorry to do this to you, I've been in your seat quite a few 
times myself, but can you please do one more push?  Please do not do the string 
concatenation.  This could be ripe for errors if the code changes later.  Just 
use a single static string which includes the words "Failed to close statement."




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 441296)
    Time Spent: 6h  (was: 5h 50m)

> Beeline may throw the misleading exception
> ------------------------------------------
>
>                 Key: HIVE-23526
>                 URL: https://issues.apache.org/jira/browse/HIVE-23526
>             Project: Hive
>          Issue Type: Improvement
>          Components: Beeline
>         Environment: Hive 1.2.2
>            Reporter: Zhihua Deng
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: HIVE-23526.2.patch, HIVE-23526.3.patch, 
> HIVE-23526.patch, outofsequence.log
>
>          Time Spent: 6h
>  Remaining Estimate: 0h
>
> Sometimes we can see 'out of sequence response' message in beeline, for 
> example:
> Error: org.apache.thrift.TApplicationException: CloseOperation failed: out of 
> sequence response (state=08S01,code=0)
> java.sql.SQLException: org.apache.thrift.TApplicationException: 
> CloseOperation failed: out of sequence response
> at 
> org.apache.hive.jdbc.HiveStatement.closeClientOperation(HiveStatement.java:198)
> at org.apache.hive.jdbc.HiveStatement.close(HiveStatement.java:217)
> at org.apache.hive.beeline.Commands.execute(Commands.java:891)
> at org.apache.hive.beeline.Commands.sql(Commands.java:713)
> at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:976)
> at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:816)
> at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:774)
> at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:487)
> at org.apache.hive.beeline.BeeLine.main(BeeLine.java:470)
> and there is no other usage message to figured it out, even with --verbose, 
> this makes problem puzzled as beeline does not have concurrency problem on 
> underlying thrift transport.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to