Skip to content
Snippets Groups Projects
Commit e678b9f0 authored by Shivaram Venkataraman's avatar Shivaram Venkataraman Committed by Josh Rosen
Browse files

[SPARK-3973] Print call site information for broadcasts

Its hard to debug which broadcast variables refer to what in a big codebase. Printing call site information helps in debugging.

Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>

Closes #2829 from shivaram/spark-broadcast-print and squashes the following commits:

cd6dbdf [Shivaram Venkataraman] Print call site information for broadcasts
parent dedace83
No related branches found
No related tags found
No related merge requests found
......@@ -818,6 +818,8 @@ class SparkContext(config: SparkConf) extends Logging {
*/
def broadcast[T: ClassTag](value: T): Broadcast[T] = {
val bc = env.broadcastManager.newBroadcast[T](value, isLocal)
val callSite = getCallSite
logInfo("Created broadcast " + bc.id + " from " + callSite.shortForm)
cleaner.foreach(_.registerBroadcastForCleanup(bc))
bc
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment