Your company ingests click-stream events into Pub/Sub and processes them in Cloud Dataflow to compute, per user, the duration of each browsing session. A session is any sequence of events separated by less than 30 minutes of inactivity. Product managers require an initial (possibly partial) session duration to be available within one minute after the first event in the session, while still accepting events that arrive up to 10 minutes late. Which Apache Beam windowing and trigger configuration best satisfies these requirements?
Global window with a processing-time trigger that fires every minute, ACCUMULATING mode, no allowed lateness
Fixed (tumbling) windows of 1 minute, allowed lateness of 10 minutes, AfterWatermark trigger only, DISCARDING mode
Session windows with a 30-minute gap duration, allowed lateness of 10 minutes, default AfterWatermark trigger plus an early firing AfterProcessingTime(1 minute) in ACCUMULATING mode
Sliding windows of 30 minutes with a 1-minute slide, no allowed lateness, trigger AfterCount(1) in DISCARDING mode
Because the business definition of a session is "activity separated by a 30-minute idle gap," the pipeline should use session windows with a 30-minute gap duration. To deliver an early, partial aggregation within one minute, add an early firing trigger that emits after one minute of processing time. The default AfterWatermark trigger ensures an on-time pane when the watermark passes the window end, and an allowed lateness of 10 minutes lets Dataflow reopen the window to merge any late events that still arrive within that tolerance. Using ACCUMULATING mode guarantees that every pane adds to the previous result instead of replacing it.
Other options fail to meet one or more requirements:
Fixed (tumbling) windows cannot adapt to user-driven session boundaries.
Sliding windows would double-count data and omit the required gap logic.
A global window with only processing-time triggers would have no concept of a 30-minute session boundary and could not close windows correctly for late data.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are session windows in Apache Beam?
Open an interactive chat with Bash
What does the 'AfterWatermark' trigger do in Apache Beam?
Open an interactive chat with Bash
What is the difference between ACCUMULATING and DISCARDING mode in Apache Beam?
Open an interactive chat with Bash
What are session windows in Apache Beam, and why are they used?
Open an interactive chat with Bash
What does 'allowed lateness' mean in windowing, and why is it important here?
Open an interactive chat with Bash
What is the role of triggers in Apache Beam, particularly the AfterWatermark trigger?
Open an interactive chat with Bash
What is a session window in Apache Beam?
Open an interactive chat with Bash
What does AfterWatermark trigger do in Apache Beam?
Open an interactive chat with Bash
What is ACCUMULATING mode in Apache Beam triggers?
Open an interactive chat with Bash
GCP Professional Data Engineer
Ingesting and processing the data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .