hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy Xiang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-15563) Ignore Illegal Operation state transition exception in SQLOperation.runQuery to expose real exception.
Date Tue, 10 Jan 2017 18:57:58 GMT

    [ https://issues.apache.org/jira/browse/HIVE-15563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815852#comment-15815852
] 

Jimmy Xiang commented on HIVE-15563:
------------------------------------

Instead of catching the state transition exception, should we check the state before set the
new state the same way as HiveSQLException is handled, and log the exception:

{noformat}
      if ((getStatus().getState() == OperationState.CANCELED)
          || (getStatus().getState() == OperationState.TIMEDOUT)
          || (getStatus().getState() == OperationState.CLOSED)) {
        return;
     }
{noformat}

> Ignore Illegal Operation state transition exception in SQLOperation.runQuery to expose
real exception.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-15563
>                 URL: https://issues.apache.org/jira/browse/HIVE-15563
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>            Priority: Minor
>         Attachments: HIVE-15563.000.patch
>
>
> Ignore Illegal Operation state transition exception in SQLOperation.runQuery to expose
real exception.
> setState may create Illegal Operation state transition exception which may  hide the
real exception. we see the following exception happened from {{setState(OperationState.ERROR);}}
in SQLOperation.runQuery
> {code}
> org.apache.hive.service.cli.operation.Operation: Error running hive query:
> org.apache.hive.service.cli.HiveSQLException: Illegal Operation state transition from
CLOSED to ERROR
>         at org.apache.hive.service.cli.OperationState.validateTransition(OperationState.java:91)
>         at org.apache.hive.service.cli.OperationState.validateTransition(OperationState.java:97)
>         at org.apache.hive.service.cli.operation.Operation.setState(Operation.java:154)
>         at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:241)
>         at org.apache.hive.service.cli.operation.SQLOperation.access$300(SQLOperation.java:82)
>         at org.apache.hive.service.cli.operation.SQLOperation$3$1.run(SQLOperation.java:288)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:422)
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1693)
>         at org.apache.hive.service.cli.operation.SQLOperation$3.run(SQLOperation.java:301)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message