felixcheung commented on a change in pull request #23435: [SPARK-25921][Follow 
Up][PySpark] Fix barrier task run without BarrierTaskContext while python 
worker reuse
URL: https://github.com/apache/spark/pull/23435#discussion_r245216113
 
 

 ##########
 File path: python/pyspark/taskcontext.py
 ##########
 @@ -140,13 +136,13 @@ class BarrierTaskContext(TaskContext):
     _port = None
     _secret = None
 
-    def __init__(self):
-        """Construct a BarrierTaskContext, use get instead"""
-        pass
-
     @classmethod
     def _getOrCreate(cls):
-        """Internal function to get or create global BarrierTaskContext."""
+        """
+        Internal function to get or create global BarrierTaskContext. We need 
to make sure
+        BarrierTaskContext returns here because it needs in python worker 
reuse scenario,
 
 Review comment:
   `We need to make sure
           BarrierTaskContext is returned from here because it is needed in 
python worker reuse scenario`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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