Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scheduling a custom mesos executor with Airbnb Chronos REST API

The Chronos site mentions that Chronos supports custom Mesos executors. The Mesos examples show how to write a custom Mesos executor (master/src/examples/java/TestExecutor.java). However, I am unable to find any documentation about how to go about scheduling such a custom executor via the Chronos RET API. Any help or pointers about this would be greatly appreciated.

Thanks in advance.

like image 408
user2549706 Avatar asked Mar 23 '23 07:03

user2549706


1 Answers

We wrote a sample executor without any logic. You can find it here: https://github.com/mesosphere/sample_mesos_executor.

Here is an example of how you post to a custom executor. Please note that the executor has to be executable. We use arx in this example, which is a executable tar file. You could also point to a shell script that does a java -cp foo.jar my.executor.implementation arg1 arg2....

echo '{"schedule":"R/2012-11-10T00:52:00Z/PT90M", \
  "name":"request_event_counter_hourly", \
  "command":"/srv/mesos/utils/run_emr.sh jar eventcounter.RequestEventCounter", \
  "epsilon":"PT15M", \
  "executor":"/srv/mesos/utils/async-executor.arx" }' | \
  http POST your-chronos-host.com:4400/scheduler/iso8601
like image 175
Florian Leibert Avatar answered Apr 28 '23 11:04

Florian Leibert