ConeyLiu commented on a change in pull request #26239: [SPARK-29582][PYSPARK] 
Unify the behavior of pyspark.TaskContext with spark core
URL: https://github.com/apache/spark/pull/26239#discussion_r339889000
 
 

 ##########
 File path: python/pyspark/worker.py
 ##########
 @@ -505,6 +505,9 @@ def main(infile, outfile):
             BarrierTaskContext._initialize(boundPort, secret)
         else:
             taskContext = TaskContext._getOrCreate()
+        # Set the task context instance here, so we can get it by 
TaskContext.get for
+        # both TaskContext and BarrierTaskContext
+        TaskContext._setTaskContext(taskContext)
 
 Review comment:
   updated

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to