use of org.apache.mesos.SchedulerDriver in project jesos by groupon.
the class LocalSchedulerMessageProcessor method frameworkRegistered.
@Subscribe
public void frameworkRegistered(final FrameworkRegisteredMessageEnvelope envelope) {
checkState(envelope.getRecipient().equals(context.getDriverUPID()), "Received a remote message for local delivery");
final FrameworkRegisteredMessage frameworkRegisteredMessage = envelope.getMessage();
if (!masterIsValid(frameworkRegisteredMessage.getMasterInfo())) {
return;
}
final FrameworkID frameworkId = frameworkRegisteredMessage.getFrameworkId();
context.connected();
context.setFailover(false);
context.setFrameworkId(frameworkId);
eventBus.post(new SchedulerCallback() {
@Override
public Runnable getCallback(final Scheduler scheduler, final SchedulerDriver schedulerDriver) {
return new Runnable() {
@Override
public void run() {
scheduler.registered(schedulerDriver, frameworkId, context.getMaster());
}
};
}
});
}
use of org.apache.mesos.SchedulerDriver in project elastic-job by dangdangdotcom.
the class AbstractCloudRestfulApiTest method setUpClass.
@BeforeClass
public static void setUpClass() throws Exception {
regCenter = mock(CoordinatorRegistryCenter.class);
jobEventRdbSearch = mock(JobEventRdbSearch.class);
SchedulerDriver schedulerDriver = mock(SchedulerDriver.class);
ProducerManager producerManager = new ProducerManager(schedulerDriver, regCenter);
producerManager.startup();
restfulService = new RestfulService(regCenter, new RestfulServerConfiguration(19000), producerManager);
restfulService.start();
}
Aggregations