I custom a receiver that can process data from an external source. And I read the doc saying
A DStream is associated with a single receiver. For attaining read
parallelism multiple receivers i.e. multiple DStreams need to be
created. A receiver is run within an executor. It occupies one core.
Ensure that there are enough cores for processing after receiver slots
are booked i.e. spark.cores.max should take the receiver slots into account. The receivers are allocated to executors in a round robin fashion.