Huawei HCIP-Big Data Developer V2.0 H13-723_V2.0 Question # 19 Topic 2 Discussion

Huawei HCIP-Big Data Developer V2.0 H13-723_V2.0 Question # 19 Topic 2 Discussion

H13-723_V2.0 Exam Topic 2 Question 19 Discussion:
Question #: 19
Topic #: 2

existSpark, assuminglinesIs anDStreamobject, which of the following statements can periodically count this number of words on a stream?


A.

lines.flatMap(_.split(" ")).map(word =>(word,1)).reduce(_+_).print( )


B.

lines.flatMap(_.split(" ")).map(word =>(word,word.length())).reduceByKey

(_+_).print( )


C.

lines.flatMap(_.split(" ")).map(word =>(word,1)).reduceByKey(_+_).print

( )


D.

lines.flatMap(_.split(" ")).flatmap(word =>(word,1)).groupByKey(_+_).print

( )


Get Premium H13-723_V2.0 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.