sven-weber-db commented on code in PR #55716:
URL: https://github.com/apache/spark/pull/55716#discussion_r3227819924
##########
python/pyspark/worker.py:
##########
@@ -3574,11 +3578,20 @@ def func(_, it):
return func, None, ser, ser
-@with_faulthandler
-def main(infile, outfile):
+def invoke_udf(message_receiver: SparkMessageReceiver, outfile: BinaryIO):
+ """
+ This function is the main processing function for worker.py.
+ It receives messages from the JVM, processes the data, and sends back
results.
+ This method goes through three phases:
+
+ Initialization -> Processing -> Finish/Cleanup
+ """
try:
boot_time = time.time()
+ # Initialization
+ infile = message_receiver.get_init_message()
Review Comment:
Yes, I agree `init_message` is a more reasonable name. I kept `infile` to
reduce touches in this PR and make it easier to review. Let me change it to
`init_message` instead.
--
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]