예제 #1
0
파일: executor.py 프로젝트: xmpy/pesos
 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
파일: scheduler.py 프로젝트: xmpy/pesos
 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
파일: scheduler.py 프로젝트: wickman/pesos
 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