You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ScrapCodes <gi...@git.apache.org> on 2014/09/01 09:20:28 UTC

[GitHub] spark pull request: [SPARK-3325] Add a parameter to the method pri...

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

    https://github.com/apache/spark/pull/2216#discussion_r16942761
  
    --- Diff: streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala ---
    @@ -603,14 +603,14 @@ abstract class DStream[T: ClassTag] (
        * Print the first ten elements of each RDD generated in this DStream. This is an output
        * operator, so this DStream will be registered as an output stream and there materialized.
        */
    -  def print() {
    +  def print(num: Int = 10) {
         def foreachFunc = (rdd: RDD[T], time: Time) => {
    -      val first11 = rdd.take(11)
    +      val firstNum = rdd.take(num + 1)
    --- End diff --
    
    Why +1 ?


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

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