Local and Cluster-based Execution
Get introduced to execution modes in a Spark application, both locally and distributedly.
We'll cover the following...
Spark execution modes
All the examples shown so far execute in interactive mode, via a server or single machine or, provided the examples are run locally, via a laptop and an IDE (this latter option with the help of the Maven execution plugin).
Spark offers different modes to execute applications, each with various benefits and use cases, so let’s explain them briefly:
-
Local Mode: This is the preferred option for developers becayse everything runs on the same environment or in a single machine (a laptop, PC, isolated server or machine, and so on).
-
Cluster Mode: This was introduced in the “Deep Dive: Internals of Spark Execution” lesson and allows for applications to run in a cluster managed by a resource manager. The cluster can be an on-premise, cloud, or even a local cluster (based on a set of Docker images, for example).
Analyzing both of these execution modes provides insight into how Spark works at both complex and straightforward levels when it comes to executing an application; this ...