In Spark, assuming that lines is a DStream object, which of the following statements can periodically count the number of words on this stream?
In Spark, assuming that lines is a DStream object, which of the following statements can periodically count the number of words on this stream?
A . Iines.flatMap(_.split ” “” )).map(word => (word, 1)).reduce(_ +_).print()
B . Iines.flatMap(_.split ” “” )).map(word => (word,word.Iength())).reduceByKey (_ +_).print()
C . Iines.fIatMap(_.spIit ” “” )).map(word => (word, 1)).reduceByKey(_ +_).print()
D . Iines.flatMap(_.split ” “” )).flatMap(word => (word, 1)).groupByKey(_ +_).print()
Answer: C
Latest H13-723-ENU Dumps Valid Version with 153 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments