示例#1
0
 def __init__(self, user, app_id):
     Api.__init__(self, user)
     self.app_id = '_'.join(
         app_id.replace('task_', 'application_').replace(
             'attempt_', 'application_').split('_')[:3])
     self.task_id = '_'.join(
         app_id.replace('attempt_', 'task_').split('_')[:5])
     self.attempt_id = app_id
示例#2
0
文件: job_api.py 项目: sandredd/hue-1
 def __init__(self, user, app_id):
   Api.__init__(self, user)
   self.app_executor_id = app_id
   self.executor_id, self.app_id = app_id.split('_executor_')
   job = NativeYarnApi(self.user).get_job(jobid=self.app_id)
   if job:
     executors = job.get_executors()
     self._executors = [executor for executor in executors if executor['executor_id'] == self.executor_id]
     self.history_server_api = job.history_server_api
示例#3
0
 def __init__(self, user, app_id):
     Api.__init__(self, user)
     start = 'appattempt_' if app_id.startswith(
         'appattempt_') else 'attempt_'
     self.app_id = '_'.join(
         app_id.replace('task_', 'application_').replace(
             start, 'application_').split('_')[:3])
     self.task_id = '_'.join(app_id.replace(start, 'task_').split('_')[:5])
     self.attempt_id = app_id
示例#4
0
文件: job_api.py 项目: cloudera/hue
 def __init__(self, user, app_id):
   Api.__init__(self, user)
   self.app_executor_id = app_id
   self.executor_id, self.app_id = app_id.split('_executor_')
   job = NativeYarnApi(self.user).get_job(jobid=self.app_id)
   if job:
     executors = job.get_executors()
     self._executors = [executor for executor in executors if executor['executor_id'] == self.executor_id]
     self.history_server_api = job.history_server_api
示例#5
0
文件: job_api.py 项目: voyageth/hue
 def __init__(self, user, app_id):
   Api.__init__(self, user)
   self.app_id = '_'.join(app_id.replace('task_', 'application_').replace('attempt_', 'application_').split('_')[:3])
   self.task_id = '_'.join(app_id.replace('attempt_', 'task_').split('_')[:5])
   self.attempt_id = app_id
示例#6
0
文件: job_api.py 项目: cloudera/hue
 def __init__(self, user, app_id):
   Api.__init__(self, user)
   start = 'appattempt_' if app_id.startswith('appattempt_') else 'attempt_'
   self.app_id = '_'.join(app_id.replace('task_', 'application_').replace(start, 'application_').split('_')[:3])
   self.task_id = '_'.join(app_id.replace(start, 'task_').split('_')[:5])
   self.attempt_id = app_id