> For the complete documentation index, see [llms.txt](https://george-jen.gitbook.io/data-science-and-apache-spark/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://george-jen.gitbook.io/data-science-and-apache-spark/discretized-streams-dstreams.md).

# Discretized Streams (DStreams)

### Discretized Streams (DStreams)

Discretized Stream or DStream is the basic abstraction provided by Spark Streaming. It represents a continuous stream of data, either the input data stream received from source, or the processed data stream generated by transforming the input stream.

Internally, a DStream is represented by a continuous series of RDDs, which is Spark's abstraction of an immutable, distributed dataset (see Spark Programming Guide for more details).

Each RDD in a DStream contains data from a certain interval, as shown in the following figure.

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M1g9IIldWyoXPdPzLpg%2F-M1gJKbqAJiPfx9XXlXC%2Fspark_streaming8.jpg?alt=media\&token=11d8cfee-96c4-4ea1-be72-163d5b8b88fc)
