Building a custom framework on Mesos
As we already know, a Mesos framework is an application running on Mesos. In this module, we will see how we can create our own Mesos framework. For the sake of simplicity, we will create a simple Java application to calculate the value of pi. A Mesos framework consists of the following three components:
Driver: This is the piece of code that submits tasks to the framework
Executor: This is the piece of code that is launched on the Mesos slave nodes to run the framework's tasks
Scheduler: This is the piece of code that registers with the master, asks for resources from it, and runs tasks on the executor
Now, let's take a look at how we can develop each of these components to build a custom Mesos framework in the following sections.
Driver implementation
The driver program is the one that creates the executor information. The executor information consists of an
executorID
being a String value and a command that is executed through the Linux /bin/sh-c
command...