Discretized Streams (DStreams) are an abstraction that Spark Streaming is built on. Each DStream is represented as a sequence of RDDs, each being created at a specific time interval. The DStream can then be processed similar to a regular RDD using concepts such as a directed cyclic graph-based execution plan (DAG). Just like a regular RDD processing, any transformations and actions that are part of the execution plan are handled in the case of a DStream as shown in the following diagram:
A DStream divides a very long stream of data into smaller chunks based on time intervals and processes each of those chunks as an RDD. ...