Github user sethah commented on the issue:

    https://github.com/apache/spark/pull/17076
  
    Updated. Well I was able to verify that adding the lazy val does make the 
task binary broadcast variable smaller - i.e. it does not vary with the size of 
the features. We could potentially test this by serializing the closure and 
checking the size, but that might be for another JIRA or we can just leave it. 
We have not done things like this in the past (then again, we keep running into 
this issue). 
    
    We could also follow the pattern used in `WeightedLeastSquares.Aggregator` 
which initializes every aggregation variable to it's default value and then 
explicitly calls an init method. This is a bit clearer, but only a bit. Maybe 
we can discuss it further in https://github.com/apache/spark/pull/17094 which 
is partly rethinking this interface anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to