use of org.apache.mesos.MesosExecutorDriver in project storm-mesos by nathanmarz.
the class MesosSupervisor method prepare.
@Override
public void prepare(Map conf, String localDir) {
try {
_state = new LocalState(localDir);
} catch (IOException e) {
throw new RuntimeException(e);
}
Semaphore initter = new Semaphore(0);
_executor = new StormExecutor(initter);
_driver = new MesosExecutorDriver(_executor);
_driver.start();
LOG.info("Waiting for executor to initialize...");
try {
initter.acquire();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
LOG.info("Executor initialized...");
Thread suicide = new SuicideDetector(conf);
suicide.setDaemon(true);
suicide.start();
}
use of org.apache.mesos.MesosExecutorDriver in project alluxio by Alluxio.
the class AlluxioMasterExecutor method main.
/**
* Starts the Alluxio master executor.
*
* @param args command-line arguments
* @throws Exception if the executor encounters an unrecoverable error
*/
public static void main(String[] args) throws Exception {
MesosExecutorDriver driver = new MesosExecutorDriver(new AlluxioMasterExecutor());
System.exit(driver.run() == Protos.Status.DRIVER_STOPPED ? 0 : 1);
}
use of org.apache.mesos.MesosExecutorDriver in project elastic-job by dangdangdotcom.
the class JobBootstrap method execute.
/**
* 执行作业.
*/
public static void execute() {
MesosExecutorDriver driver = new MesosExecutorDriver(new TaskExecutor());
System.exit(Protos.Status.DRIVER_STOPPED == driver.run() ? 0 : -1);
}
use of org.apache.mesos.MesosExecutorDriver in project cassandra-mesos-deprecated by mesosphere.
the class CassandraExecutor method main.
public static void main(final String[] args) {
final MesosExecutorDriver driver = new MesosExecutorDriver(new CassandraExecutor(new ProdObjectFactory()));
final int status;
switch(driver.run()) {
case DRIVER_STOPPED:
status = 0;
break;
case DRIVER_ABORTED:
status = 1;
break;
case DRIVER_NOT_STARTED:
status = 2;
break;
default:
status = 3;
break;
}
driver.stop();
System.exit(status);
}
use of org.apache.mesos.MesosExecutorDriver in project alluxio by Alluxio.
the class AlluxioWorkerExecutor method main.
/**
* Starts the Alluxio worker executor.
*
* @param args command-line arguments
* @throws Exception if the executor encounters an unrecoverable error
*/
public static void main(String[] args) throws Exception {
MesosExecutorDriver driver = new MesosExecutorDriver(new AlluxioWorkerExecutor());
System.exit(driver.run() == Protos.Status.DRIVER_STOPPED ? 0 : 1);
}
Aggregations