- Compile this Mesos fork like you normally would.
Notice that we are currently on the custom-exec
branch.
- Set the environment variable
MESOS_DEFAULT_EXECUTOR_PATH
to$BUILD_DIR/src/mesos-simexecutor
BUILD_DIR
is your build directory.
-
Set the environment variable
MESOS_SIMULATOR_CONFIG_PATH
to point to a config file. The config file must conform to the format described below. -
Before you launch
mesos-local
, it's helpful to run the following commands, especially if you want to run a lot of local slaves:
export MESOS_REGISTRY=in_memory
export MESOS_MAX_SLAVE_PING_TIMEOUTS=30000
export MESOS_SLAVE_PING_TIMEOUT=15mins
# Only if you are running mesos-local on a Mac
sudo launchctl limit maxfiles 1000000 1000000
sudo launchctl limit maxproc 2500
ulimit -n 40960
- Start the newly built
mesos-local
(under$BUILD_DIR/bin
). Use the--num_slaves
flag if you want to spawn multiple slaves. Then just start your framework and launch tasks as usual.
The config needs to be a valid JSON file. Here is an example:
{
"task_specs": [
{
"pattern": "SOME_PREFIX.*",
"failure_rate": 0.3,
"length_mean": 2.9827,
"length_std": 1.231
},
{
"pattern": ".*",
"failure_rate": 0.1,
"length_mean": 10.23052,
"length_std": 5.25329
}
]
}
pattern
is a regex pattern used to match task IDs.
length_mean
and length_std
are in seconds.
To explain, the first spec says that: all tasks whose IDs start with SOME_PREFIX
have a 30% chance of failing. On average, they should run 2.9827 seconds. The standard deviation for their run time is 1.231 seconds. Note that the task lengths follow a normal distribution.
Use .*
to match all tasks, as in the second spec.