Spark’s main feature is that a pipeline (a Java, Scala, Python or R script) can be run both locally (for development) and on a cluster, without having to change any of the source code.Spark allows this flexibility by cleverly using delayed computation or, as it is called in some contexts, laziness.