Github user squito commented on the pull request:
https://github.com/apache/spark/pull/2851#issuecomment-74298037
hmm, ok now I see that it is hard to get the BroadcastBlockIds into the
task end metrics, since when broadcast blocks get created, its a side effect of
task-deserialization, so the broadcast var doesn't really know which task its
being created for. The only other option I can think of is to create a
`ThreadLocal` with the current task id, before deserializing the task
[here](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/Executor.scala#L177).
Then when the broadcast var is actually put in the block manager, ([eg. for
`TorrentBroadcast`](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala#L181))
and finally when the task is finished you'd [update the
metrics](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/Executor.scala#L214).
Honestly I am somewhat torn between (a) leaving it as you have it, (b) what
I've outlined in this comment, and (c) having RDD block info also tracked by
your new mechansim (option 2 above)
---
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]