[SPARK-3325] Add a parameter to the method print in class DStream.

I have deleted the repository with mistake, so I create a new PR. old PR:https://github.com/apache/spark/pull/2216

def print(num: Int = 10)
User can control the number of elements which to print.