GitHub user squito opened a pull request:

    https://github.com/apache/spark/pull/15181

    [SPARK-17623][CORE] Clarify type of TaskEndReason with a failed task.

    ## What changes were proposed in this pull request?
    
    In TaskResultGetter, enqueueFailedTask currently deserializes the result
    as a TaskEndReason. But the type is actually more specific, its a
    TaskFailedReason. This just leads to more blind casting later on – it
    would be more clear if the msg was cast to the right type immediately,
    so method parameter types could be tightened.
    
    ## How was this patch tested?
    
    Existing unit tests via jenkins.  Note that the code was already performing 
a blind-cast to a TaskFailedReason before in any case, just in a different 
spot, so there shouldn't be any behavior change.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/squito/spark SPARK-17623

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/15181.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15181
    
----
commit 0bd782bff9e450625b6015589060d32f0133d499
Author: Imran Rashid <iras...@cloudera.com>
Date:   2016-09-21T15:57:45Z

    [SPARK-17623][CORE] Clarify type of TaskEndReason with a failed task.
    
    In TaskResultGetter, enqueueFailedTask currently deserializes the result
    as a TaskEndReason. But the type is actually more specific, its a
    TaskFailedReason. This just leads to more blind casting later on – it
    would be more clear if the msg was cast to the right type immediately,
    so method parameter types could be tightened.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to