Question 2Easy
Event time differs from processing time in that event time is
- When the system received it on the processing server, as seen by the clock on that machine
- When the result is displayed
- The server boot time
- When the event actually occurred, as recorded in the data
Answer: D. When the event actually occurred, as recorded in the data
Explanation
Using event time gives correct results even when events arrive late or out of order.
Step-by-step solution
- Event carries timestamp.
- Processing time is the clock now.
- Event time is stable.
Why the other options are wrong
- A. That is ingestion time.
- B. Not a defined time.
- C. Unrelated.
Question 4Medium
A tumbling window of 5 minutes in stream processing
- Overlaps every minute, sliding forward by one minute each time
- Waits for inactivity gaps
- Splits the stream into fixed-size, non-overlapping time intervals
- Holds all data forever
Answer: C. Splits the stream into fixed-size, non-overlapping time intervals
Explanation
Each event falls into exactly one tumbling window.
Step-by-step solution
- Fixed 5 minute size.
- No overlap.
- Each event in one window.
Why the other options are wrong
- A. That is a sliding window.
- B. That is a session window.
- D. That is no window.
Question 5Medium
Exactly-once processing semantics mean that
- An event may be processed zero times after a failure and so may lose some of the events
- Each event affects the final result once even if failures and retries happen
- An event is always processed twice
- No retry is allowed
Answer: B. Each event affects the final result once even if failures and retries happen
Explanation
It combines replayable sources, checkpoints and idempotent or transactional sinks.
Step-by-step solution
- Failures cause retries.
- Retries must not double count.
- Use checkpoints plus idempotence.
Why the other options are wrong
- A. That is at-most-once.
- C. Duplicates would break results.
- D. Retries occur but effects are deduplicated.
Question 6Hard
Watermarks in stream processing are used to
- Decide how long to wait for late events before closing event-time windows
- Encrypt events and attach a signature to each event
- Remove duplicate events
- Compress state
Answer: A. Decide how long to wait for late events before closing event-time windows
Explanation
A watermark says that event time up to T has probably been seen, letting the system emit results while bounding state.
Step-by-step solution
- Events can arrive late.
- Watermark marks progress in event time.
- Window closes after watermark passes.
Why the other options are wrong
- B. Unrelated.
- C. Dedup uses keys.
- D. Unrelated.