spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neelesh Shastry (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-12452) Add exception details to TaskCompletionListener/TaskContext
Date Mon, 21 Dec 2015 18:12:46 GMT

     [ https://issues.apache.org/jira/browse/SPARK-12452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Neelesh Shastry updated SPARK-12452:
------------------------------------
    Component/s:     (was: Streaming)
                 Spark Core

> 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


Mime
View raw message