You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/30 00:35:36 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #26239: [SPARK-29582][PYSPARK] Support `TaskContext.get()` in a barrier task from Python side

HyukjinKwon commented on a change in pull request #26239: [SPARK-29582][PYSPARK] Support `TaskContext.get()` in a barrier task from Python side
URL: https://github.com/apache/spark/pull/26239#discussion_r340386501
 
 

 ##########
 File path: python/pyspark/worker.py
 ##########
 @@ -596,6 +599,10 @@ def process():
             profiler.profile(process)
         else:
             process()
+
+        # reset task context to None
+        TaskContext._setTaskContext(None)
+        BarrierTaskContext._setTaskContext(None)
 
 Review comment:
   > If exceptions occured, the worker will be closed with `sys.exit(-1)`.
   
   I meant, this guard logic will be ignored anyway in that case. Why do we need this if we should only clean up when it succeeds?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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