
Answer-first summary for fast verification
Answer: a five-minute Tumbling window
## Analysis of Windowing Functions for Unique Tweet Counting ### Requirements: - Count tweets every 5 minutes - Each tweet must be counted only once - Output represents the count of tweets during the last 5 minutes ### Evaluation of Options: **A: Five-minute Sliding window** ❌ - Sliding windows output results whenever an event enters or exits the window - This would produce overlapping counts and potentially count the same tweet multiple times across different output intervals - Does not guarantee each tweet is counted only once **B: Five-minute Session window** ❌ - Session windows group events that occur close together in time, separated by gaps - Designed for analyzing user sessions, not for fixed-interval counting - Would not reliably produce counts every 5 minutes and may group tweets unpredictably **C: Five-minute Hopping window with one-minute hop** ❌ - Hopping windows produce overlapping results - With a 1-minute hop and 5-minute size, each tweet would appear in 5 consecutive outputs - Violates the requirement that each tweet must be counted only once **D: Five-minute Tumbling window** ✅ - Tumbling windows are non-overlapping, fixed-size intervals - Each tweet falls into exactly one 5-minute window - Guarantees each tweet is counted only once - Produces output every 5 minutes as required - Perfectly matches the requirement for counting unique tweets in discrete 5-minute intervals ### Conclusion: The tumbling window is the optimal choice because it creates discrete, non-overlapping time intervals where each event (tweet) is assigned to exactly one window. This ensures that tweets are never double-counted across different output periods, while still providing the required 5-minute aggregation intervals.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You use Azure Stream Analytics to ingest Twitter data from Azure Event Hubs and output the results to an Azure Blob storage account. You need to output the count of unique tweets every five minutes, with each tweet counted only once. Which windowing function should you use?
A
a five-minute Sliding window
B
a five-minute Session window
C
a five-minute Hopping window that has a one-minute hop
D
a five-minute Tumbling window
No comments yet.