GitHub user xuanyuanking opened a pull request:

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

    [SPARK-25921][PySpark] Fix BarrierTaskContext while python worker reuse

    ## What changes were proposed in this pull request?
    
    While python worker reuse, BarrierTaskContext._getOrCreate() will still 
return a TaskContext, we'll get a `AttributeError: 'TaskContext' object has no 
attribute 'barrier'`. Fix this by adding check logic in 
BarrierTaskContext._getOrCreate() and rewrite `__new__` method for 
BarrierTaskContext.
    
    ## How was this patch tested?
    
    Add new UT in pyspark-core.


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

    $ git pull https://github.com/xuanyuanking/spark SPARK-25921

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

    https://github.com/apache/spark/pull/22962.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 #22962
    
----
commit 0cb2cf6e9ece66861073c31b579b595a9de5ce81
Author: Yuanjian Li <xyliyuanjian@...>
Date:   2018-11-07T10:01:54Z

    fix BarrierTaskContext while python worker reuse

----


---

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

Reply via email to