[
https://issues.apache.org/jira/browse/SPARK-20345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xiao Li resolved SPARK-20345.
-----------------------------
Resolution: Fixed
Assignee: Dongjoon Hyun
Fix Version/s: 2.3.0
2.2.1
> Fix STS error handling logic on HiveSQLException
> ------------------------------------------------
>
> Key: SPARK-20345
> URL: https://issues.apache.org/jira/browse/SPARK-20345
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6.3, 2.1.0
> Reporter: Dongjoon Hyun
> Assignee: Dongjoon Hyun
> Fix For: 2.2.1, 2.3.0
>
>
> [SPARK-5100|https://github.com/apache/spark/commit/343d3bfafd449a0371feb6a88f78e07302fa7143]
> added Spark Thrift Server UI and the following logic to handle exceptions on
> case `Throwable`.
> {code}
> HiveThriftServer2.listener.onStatementError(
> statementId, e.getMessage, SparkUtils.exceptionString(e))
> {code}
> However, there occurred a missed case after implementing
> [SPARK-6964|https://github.com/apache/spark/commit/eb19d3f75cbd002f7e72ce02017a8de67f562792]'s
> `Support Cancellation in the Thrift Server` by adding case
> `HiveSQLException` before case `Throwable`.
> Logically, we had better add `HiveThriftServer2.listener.onStatementError` on
> case `HiveSQLException`, too.
> {code}
> case e: HiveSQLException =>
> if (getStatus().getState() == OperationState.CANCELED) {
> return
> } else {
> setState(OperationState.ERROR)
> throw e
> }
> // Actually do need to catch Throwable as some failures don't inherit
> from Exception and
> // HiveServer will silently swallow them.
> case e: Throwable =>
> val currentState = getStatus().getState()
> logError(s"Error executing query, currentState $currentState, ", e)
> setState(OperationState.ERROR)
> HiveThriftServer2.listener.onStatementError(
> statementId, e.getMessage, SparkUtils.exceptionString(e))
> throw new HiveSQLException(e.toString)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]