Your online gaming platform sends player action events to Pub/Sub, then processes them in an Apache Beam/Dataflow pipeline. A game session is a burst of events separated by less than 20 minutes of inactivity. The pipeline must: emit the session result as soon as the gap closes; accept late events for up to 5 minutes and issue one update; drop anything later. Which Beam windowing and trigger setup meets these requirements?
Use 1-hour fixed (tumbling) windows with the default AfterWatermark trigger and no allowed-lateness period.
Place all events in a global window and register processing-time timers to close sessions after 20 minutes of inactivity, disabling allowed lateness.
Configure a session window with a 20-minute gap duration, set 5-minute allowed lateness, and use an AfterWatermark trigger with one late firing in accumulating mode.
Apply 20-minute sliding windows with a 5-minute slide interval and AfterProcessingTime triggers firing every minute.
A session window groups events that are separated by no more than a specified gap duration, which matches the 20-minute inactivity rule. Setting an allowed-lateness of 5 minutes tells Dataflow to keep the window pane open for that period to accept straggling events. Using an AfterWatermark.pastEndOfWindow() trigger with a single late firing-such as withLateFirings(AfterProcessingTime.pastFirstElementInPane(Duration.standardMinutes(5)))-and ACCUMULATING mode ensures that:
The first pane is emitted as soon as the watermark passes the session end (requirement a).
Exactly one additional pane is produced if late data arrive within 5 minutes, updating the previous result (requirement b).
Events arriving after the allowed-lateness window are dropped (requirement c). Fixed or sliding windows cannot model user-driven session boundaries, and a global window would require custom gap-detection logic, increasing complexity.
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 is a session window in Apache Beam?
Open an interactive chat with Bash
What does allowed lateness mean in Apache Beam?
Open an interactive chat with Bash
What is the purpose of an AfterWatermark trigger in Apache Beam?
Open an interactive chat with Bash
What is a session window in Apache Beam?
Open an interactive chat with Bash
What does 'allowed lateness' mean in Beam pipelines?
Open an interactive chat with Bash
What is the AfterWatermark trigger and why use it?
Open an interactive chat with Bash
What is a session window 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 allowed lateness in Apache Beam, and why is it important?
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 .