apache/spark — pull request #3662 by surq (2014-12-10 10:52:46+00:00)
Title: Print the specified number of data and handle all of the elements in RDD

Dstream.print function:Print 10 elements and handle 11 elements.
A new function based on Dstream.print function is presented:
the new function:
Print the specified number of data and handle all of the elements in RDD.
there is a work scene:
val dstream = stream.map->filter->mapPartitions->print
the data after filter need update database in mapPartitions,but don't need print each data,only need to print the top 20 for view the data processing.