Пример #1
0
 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()
Пример #2
0
 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()
Пример #3
0
 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
Пример #4
0
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()
Пример #5
0
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()
Пример #6
0
 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