Stream Processing Questions with Answers

6 practice questions on Stream Processing (Big Data (Hadoop & Spark)) with answers and step-by-step solutions. Try 6 samples below, then practise all 6 free in the AptiNest app.

Sample questions

Question 1Easy

Which of these is a stream processing framework?

  1. Apache Flink
  2. Apache Hive, the batch SQL engine that runs on top of HDFS
  3. HDFS
  4. Sqoop

Answer: A. Apache Flink

Explanation

Flink and Spark Structured Streaming process unbounded data continuously.

Step-by-step solution

  1. Unbounded data.
  2. Continuous operators.
  3. Flink fits.

Why the other options are wrong

  • B. Hive is batch SQL.
  • C. Storage system.
  • D. Bulk transfer between RDBMS and Hadoop.

Question 2Easy

Event time differs from processing time in that event time is

  1. When the system received it on the processing server, as seen by the clock on that machine
  2. When the result is displayed
  3. The server boot time
  4. 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

  1. Event carries timestamp.
  2. Processing time is the clock now.
  3. Event time is stable.

Why the other options are wrong

  • A. That is ingestion time.
  • B. Not a defined time.
  • C. Unrelated.

Question 3Medium

A sliding window of size 10 minutes that advances every 5 minutes means each event belongs to

  1. 1 window
  2. 10 windows
  3. 5 windows
  4. 2 windows

Answer: D. 2 windows

Explanation

Windows overlap by 5 minutes; size/slide = 10/5 = 2 windows per event.

Step-by-step solution

  1. Size 10, slide 5.
  2. Number of windows = size/slide.
  3. = 2.

Why the other options are wrong

  • A. That is a tumbling window.
  • B. Would need 1 minute slide.
  • C. Not given by this combination.

Question 4Medium

A tumbling window of 5 minutes in stream processing

  1. Overlaps every minute, sliding forward by one minute each time
  2. Waits for inactivity gaps
  3. Splits the stream into fixed-size, non-overlapping time intervals
  4. 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

  1. Fixed 5 minute size.
  2. No overlap.
  3. 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

  1. An event may be processed zero times after a failure and so may lose some of the events
  2. Each event affects the final result once even if failures and retries happen
  3. An event is always processed twice
  4. 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

  1. Failures cause retries.
  2. Retries must not double count.
  3. 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

  1. Decide how long to wait for late events before closing event-time windows
  2. Encrypt events and attach a signature to each event
  3. Remove duplicate events
  4. 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

  1. Events can arrive late.
  2. Watermark marks progress in event time.
  3. Window closes after watermark passes.

Why the other options are wrong

  • B. Unrelated.
  • C. Dedup uses keys.
  • D. Unrelated.

Practise all 6 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Big Data (Hadoop & Spark) topics · All topics