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

    https://github.com/apache/spark/pull/1723#discussion_r16336535
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala ---
    @@ -302,8 +325,10 @@ abstract class DStream[T: ClassTag] (
                       " for checkpointing at time " + time)
                   }
                   generatedRDDs.put(time, newRDD)
    +              setCallSite(prevCallSite)
    --- End diff --
    
    Dealing with this separately in two code paths is prone to errors in the 
future. Can you make the `compute(time) match { ... }` return into a variable 
and use that later. Something like this.
    
    ```
    val rddOption = compute(time) match {
        // no setCallSite inside this
    }
    setCallSite(prevCallSite)   // only one instance of setCallSite, common to 
both code paths.
    return rddOption
    ```
    
    And while on that, can you also add `return` at other code paths in this 
function. That is, the `None` in lines 332 and 335 in this commit?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to