Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/9315#discussion_r43946785
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala ---
@@ -374,26 +374,53 @@ abstract class DStream[T: ClassTag] (
* Wrap a body of code such that the call site and operation scope
* information are passed to the RDDs created in this body properly.
*/
- protected def createRDDWithLocalProperties[U](time: Time)(body: => U): U
= {
+ protected[streaming] def createRDDWithLocalProperties[U](time:
Time)(body: => U): U = {
+ createRDDWithLocalProperties(time, makeRDDOpsVisibleInUI = false)(body)
+ }
+
+ /**
+ * Wrap a body of code such that the call site and operation scope
+ * information are passed to the RDDs created in this body properly.
+ */
+ protected[streaming] def createRDDWithLocalProperties[U](
+ time: Time,
+ makeRDDOpsVisibleInUI: Boolean)(body: => U): U = {
val scopeKey = SparkContext.RDD_SCOPE_KEY
val scopeNoOverrideKey = SparkContext.RDD_SCOPE_NO_OVERRIDE_KEY
// Pass this DStream's operation scope and creation site information
to RDDs through
// thread-local properties in our SparkContext. Since this method may
be called from another
// DStream, we need to temporarily store any old scope and creation
site information to
// restore them later after setting our own.
- val prevCallSite = ssc.sparkContext.getCallSite()
+ val prevCallSite = CallSite(
+ ssc.sparkContext.getLocalProperty(CallSite.SHORT_FORM),
+ ssc.sparkContext.getLocalProperty(CallSite.LONG_FORM)
+ )
--- End diff --
This change is needed because getCallSite actually returns a callsite if
nothing is set. So later, at the time of restoring, we may set callsite when
none existed.
---
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]