예제 #1
0
func (k *k8smScheduler) launchTask(task *podtask.T) error {
	// assume caller is holding scheduler lock
	taskList := []*mesos.TaskInfo{task.BuildTaskInfo()}
	offerIds := []*mesos.OfferID{task.Offer.Details().Id}
	filters := &mesos.Filters{}
	_, err := k.internal.driver.LaunchTasks(offerIds, taskList, filters)
	return err
}
예제 #2
0
func (ks *framework) LaunchTask(t *podtask.T) error {
	// assume caller is holding scheduler lock
	taskList := []*mesos.TaskInfo{t.BuildTaskInfo(ks.executor)}
	offerIds := []*mesos.OfferID{t.Offer.Details().Id}
	filters := &mesos.Filters{}
	_, err := ks.driver.LaunchTasks(offerIds, taskList, filters)
	return err
}