You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jagadeesan A S (JIRA)" <ji...@apache.org> on 2016/08/31 05:19:21 UTC
[jira] [Commented] (SPARK-12452) Add exception details to
TaskCompletionListener/TaskContext
[ https://issues.apache.org/jira/browse/SPARK-12452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15451171#comment-15451171 ]
Jagadeesan A S commented on SPARK-12452:
----------------------------------------
[~srowen] any suggestion from your side..? can i take it up..?
> Add exception details to TaskCompletionListener/TaskContext
> -----------------------------------------------------------
>
> Key: SPARK-12452
> URL: https://issues.apache.org/jira/browse/SPARK-12452
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core
> Affects Versions: 1.5.2
> Reporter: Neelesh Shastry
> Priority: Minor
>
> TaskCompletionListeners are called without success/failure details.
> If we change this
> {code}
> trait TaskCompletionListener extends EventListener {
> def onTaskCompletion(context: TaskContext)
> }
> class TaskContextImpl {
> ....
> private[spark] def markTaskCompleted(throwable:Option[Throwable]): Unit
> ....
> listener.onTaskCompletion(this,throwable)
> }
> {code}
> to something like
> {code}
> trait TaskCompletionListener extends EventListener {
> def onTaskCompletion(context: TaskContext, throwable:Option[Throwable]=None)
> }
> {code}
> .. and in Task.scala
> {code}
> val results = Try(runTask(context))
> var throwable:Option[Throwable] = None
> try {
> runTask(context)
>
> }catch{
> case t:Throwable => throwable=t
> }
> finally {
> context.markTaskCompleted(throwable)
> TaskContext.unset()
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org