1.

What are the different cluster managers supported by Spark?

Answer»

Spark supports several cluster managers. They are:

  • Standalone: This is the easiest mode to set up and configure. If you need to run only Spark application on the cluster then this mode serves well. However, if you want to run Spark along with other applications or need better resource SCHEDULING capabilities then other modes – YARN or Mesos are better suited. The standalone mode REQUIRES each application to run an executor on every node in the cluster.
  • YARN: YARN or Yet ANOTHER Resource Manager is a more commonly used cluster manager with Spark. It ships with the Hadoop framework and provides two different modes:
    • Client mode – In this mode, the driver program will run on the machine from where Spark job is submitted. This mode can be chosen for running small jobs. In case the driver node dies, then the application needs to be resubmitted.
    • Cluster mode – In this mode, the driver will get launched inside the Spark cluster. This makes the application fault-tolerant as cluster manager tries to relaunch the driver on another node in case driver node fails.
  • Mesos: This mode consists of a master daemon which manages agent daemons running on each cluster node. AGENTS report to the master about free resources available with them. The master determines how many resources to be offered to each framework and which of the offered resources are to be used. Mesos, in turn, launches tasks on corresponding agents. All the above cluster managers provide VARIOUS scheduling capabilities but Mesos provides the finest grained sharing options.


Discussion

No Comment Found