You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/04/15 19:06:41 UTC
[jira] [Assigned] (SPARK-20345) Fix STS error handling logic on
HiveSQLException
[ https://issues.apache.org/jira/browse/SPARK-20345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-20345:
------------------------------------
Assignee: (was: Apache Spark)
> 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
>
> [SPARK-5100|https://github.com/apache/spark/commit/343d3bfafd449a0371feb6a88f78e07302fa7143] added Spark Thrift UI and the following logic to handle exceptions like the following on case `Throwable`.
> {code}
> HiveThriftServer2.listener.onStatementError(
> statementId, e.getMessage, SparkUtils.exceptionString(e))
> {code}
> However, there occurs 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.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org