Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6034#discussion_r30388389
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDDOperationScope.scala 
---
    @@ -88,14 +87,25 @@ private[spark] object RDDOperationScope {
     
       /**
        * Execute the given body such that all RDDs created in this body will 
have the same scope.
    -   * The name of the scope will be the name of the method that immediately 
encloses this one.
    +   * The name of the scope will be the first method name in the stack 
trace that is not the
    +   * same as this method's.
        *
        * Note: Return statements are NOT allowed in body.
        */
       private[spark] def withScope[T](
           sc: SparkContext,
           allowNesting: Boolean = false)(body: => T): T = {
    -    val callerMethodName = 
Thread.currentThread.getStackTrace()(3).getMethodName
    +    val stackTrace = Thread.currentThread.getStackTrace().tail // ignore 
"Thread#getStackTrace"
    +    val ourMethodName = stackTrace(1).getMethodName
    --- End diff --
    
    I didn't do it cause if we change the method name then we must update the 
comment. It's a little like duplicating code. But I can add it not a big deal


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