RTUComputer ScienceYr 2023 · Sem 82023

Q22Big Data Analytics

Question

10 marks

Explain Streaming data processing with Spark Streaming.

Answer

Spark Streaming enables scalable, high-throughput, fault-tolerant processing of live data streams using micro-batching.

Instead of processing data record-by-record, Spark Streaming uses a micro-batch architecture: 1. Data Ingestion: It ingests live data streams from sources like Kafka, Flume, or TCP sockets. 2. Micro-Batching: The continuous stream of data is divided into small batches of a specific time interval (e.g., 1 second). 3. DStream (Discretized Stream): The abstraction used by Spark Streaming, representing a continuous sequence of RDDs. Each RDD contains the data received during a specific time interval. 4. Processing: The Spark engine processes these RDDs using complex algorithms expressed with high-level functions like map, reduce, join, and window. 5. Output: The processed batches can be pushed to databases, HDFS, or live dashboards. Because it relies on Spark Core's RDDs, it inherits strong fault-tolerance, automatically recovering lost state and data upon node failure.

Spark Streaming Flow Diagram
Spark Streaming Flow Diagram
Back to Paper