Spenserrrr commented on code in PR #59246:
URL: https://github.com/apache/spark/pull/59246#discussion_r4252019514


##########
python/pyspark/eval_handlers/_base.py:
##########
@@ -99,11 +99,8 @@ def __init__(
         self._udfs = udfs
         self._runner_conf = runner_conf
         self._eval_conf = eval_conf
-        self._worker_metrics: Optional["WorkerMetrics"] = None
-
-    def set_worker_metrics(self, metrics: "WorkerMetrics") -> None:
-        """Attach the collector owned by the current worker task."""
-        self._worker_metrics = metrics
+        # A handler is constructed for each task, including tasks in a reused 
worker.
+        self.metrics = WorkerMetrics()

Review Comment:
   The collector now lives in `worker_metrics.py` and tracks task timestamps 
and spill values as well as phase durations, so `WorkerMetrics` remains the 
broader name. Handler-local timing was removed. Resolving this older thread.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to