Microsoft Exam Questions

Which function should you use?

Note: This question is part of a series of questions that use the same scenario. For your convenience,
the scenario is repeated in each question. Each question presents a different goal and answer choices,
but the text of the scenario is exactly the same in each question in this series.
You have an initial dataset that contains the crime data from major cities.
You plan to build training models from the training data. You plan to automate the process of adding more data
to the training models and to constantly tune the models by using the additional data, including data that is
collected in near real-time. The system will be used to analyze event data gathered from many different
sources, such as Internet of Things (IoT) devices, live video surveillance, and traffic activities, and to generate
predictions of an increased crime risk at a particular time and place.
You have an incoming data stream from Twitter and an incoming data stream from Facebook, which are eventbased only, rather than time-based. You also have a time interval stream every 10 seconds.
The data is in a key/value pair format. The value field represents a number that defines how many times a
hashtag occurs within a Facebook post, or how many times a Tweet that contains a specific hashtag is
retweeted.
You must use the appropriate data storage, stream analytics techniques, and Azure HDInsight cluster types for
the various tasks associated to the processing pipeline.
You plan to consolidate all of the streams into a single timeline, even though none of the streams report events
at the same interval.
You need to aggregate the data from the feeds to alight with the time interval stream. The result must be the
sum of all the values for each key within a 10 second interval, with the keys being the hashtags.
Which function should you use?

A.
countByWindow

B.
reduceByWindow

C.
reduceByKeyAndWindow

D.
countByValueAndWindow

E.
updateStateByKey