Skip to content

Commit e7ebb08

Browse files
committed
removed wasted print in DStream
1 parent d8b593b commit e7ebb08

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaDStreamLike.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ trait JavaDStreamLike[T, This <: JavaDStreamLike[T, This, R], R <: JavaRDDLike[T
5454
dstream.print()
5555
}
5656

57-
def print(label: String = null): Unit = {
58-
dstream.print(label)
59-
}
60-
61-
def outputToFile(): Unit = {
62-
dstream.outputToFile()
63-
}
64-
65-
6657
/**
6758
* Return a new DStream in which each RDD has a single element generated by counting each RDD
6859
* of this DStream.

streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -617,23 +617,6 @@ abstract class DStream[T: ClassTag] (
617617
new ForEachDStream(this, context.sparkContext.clean(foreachFunc)).register()
618618
}
619619

620-
621-
def print(label: String = null) {
622-
def foreachFunc = (rdd: RDD[T], time: Time) => {
623-
val first11 = rdd.take(11)
624-
println ("-------------------------------------------")
625-
println ("Time: " + time)
626-
println ("-------------------------------------------")
627-
if(label != null){
628-
println (label)
629-
}
630-
first11.take(10).foreach(println)
631-
if (first11.size > 10) println("...")
632-
println()
633-
}
634-
new ForEachDStream(this, context.sparkContext.clean(foreachFunc)).register()
635-
}
636-
637620
/**
638621
* Return a new DStream in which each RDD contains all the elements in seen in a
639622
* sliding window of time over this DStream. The new DStream generates RDDs with

0 commit comments

Comments
 (0)