hui730 commented on PR #43621:
URL: https://github.com/apache/spark/pull/43621#issuecomment-1790095897

   > Each task has a reference to a broadcast'ed task binary `Array[Byte]` - 
not the object. This `Array[Byte]` is pulled to each executor once - and for 
each subsequent task, this `Array[Byte]` is reused to deserialize and create a 
new task closure. So essentially we are trying to save on a jvm local 
deserialization cost.
   > 
   > Explicit use of broadcast variables is documented to be read only - but 
with task closures, I would be very reluctant to assume this behavior. If the 
instance is reused, task closures can start having side effects on other tasks 
in the same executor.
   
   Okay, I get what you mean. Especially in Hadoop.
   My plan is to create a new binary from executor binary,use 
System.arraycopy().
   How do you like it, sir?:)


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