def __init__(self, executor, context=None): self.context = context or Context.singleton() self.executor = executor self.executor_process = None self.executor_pid = None self.status = mesos.DRIVER_NOT_STARTED self.lock = threading.Condition()
def __init__(self, scheduler, framework, master_uri, credential=None, context=None): self.context = context or Context.singleton() self.scheduler = scheduler self.scheduler_process = None self.master_uri = master_uri self.framework = framework self.lock = threading.Condition() self.status = mesos.DRIVER_NOT_STARTED self.detector = None self.credential = credential
def main(args): context = Context.singleton() executor = ExampleExecutor() driver = PesosExecutorDriver(executor, context=context) print('Starting driver') driver.start() print('Joining driver') driver.join() context.stop()
def __init__(self, scheduler, framework, master_uri, credential=None, context=None): self.context = context or Context.singleton() self.scheduler = scheduler self.scheduler_process = None self.master_uri = master_uri self.framework = framework self.lock = threading.Condition() self.status = mesos_pb2.DRIVER_NOT_STARTED self.detector = None self.credential = credential